« Yet another Car PC project!Como impedir todos os motores de pesquisa de indexar um site »

Close Firefox Window using javascript

11/26/07 | by Paulo Jacob [mail] | Categories: General

from http://www.interwebby.com/blog/2006/02/04/3/

<HTML>
<HEAD>
<TITLE>The End</TITLE>
<SCRIPT LANGUAGE=JAVASCRIPT>
function killIt()
{
        window.open('','_parent','');
        window.close();
}
</SCRIPT>
</HEAD>

<BODY onLoad='killIt()'>

You will never see this. Unless you're really fast

</BODY>
</HTML>

In firefox 2.0 this won't work out of the box. You also need to:

about:config
dom.allow_scripts_to_close_windows = true

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

To me success is to live your life to the best of your abilities and making the most of your unique talents in order to help the greatest amount of people around you

powered by b2evolution free blog software