Skrypty mogą zamykać tylko okna, które były przez nich otwarte

open window with target="_blank"
and the perform window.close();
Lokesh003