michelc Blog

Just <strong>another</strong> WordPress.com weblog

Archive for Mai 2005

Fermer la fenêtre du navigateur

leave a comment »

Cette méthode fonctionne avec Internet Explorer (testé avec IE6) et Firefox (testé avec FF 1.5)

<input type="button" value="Close" onclick="CloseWindow();" />
<script type='text/javascript'>
<!--
function CloseWindow() {
	ww = window.open(window.location, "_self");
	ww.close();
} 
-->
</script>

(publié à l’origine sur http://www.bigbold.com/snippets/posts/show/267)

Written by michel

10 Mai 2005 at 4:11

Publié dans Code Snippets, javascript