webmaster resources tips and articles
webmaster information

Path = Home : Javascript Tips : How To Close A Window With A Button Or Link

How To Close A Window With A Button Or Link

 

Close a window with a button

<form>
<input type="button" value="Close this window" onClick="window.close()">
</form>

 

Close a window with a link

<a href="javascript: self.close()">Close this window</a>

Close this window

Note that the button and link has been disabled so they won't do anything if you click them - they are just there to show you how they would look on your web page.

 


 

 

© janim.net 2000 - 2008 All rights reserved