Close the parent browser (in javascript)

everybody know how to close the child browser by javascript (window.close()).

but how can i close the parent browser ? (main browser)

 

and the answer is...

javascript:window.close(opener = 0);

:)

 

(if u want to close the parent and open child see the sample)

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish