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

Close Firefox Window using javascript

2007-11-26

Permalink 04:47:26 pm, 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

Search

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

User tools

Tag cloud

twitter vmware

powered by b2evolution free blog software