CodeAve.com CodeAve.com - JavaScript - Navigation
ASP
JavaScript
·Document Info
·Forms
·Images
·Miscellaneous
·Navigation
·Script Writers
·Contents
·What's New?
CSS
HTML
Links
Mail List
Search
Sitemap


 


Close Window
Within your document you can easily provide a way to close the current browser session similar to clicking File -> Close in the toolbar or by clicking the X in the upper right had corner of most browsers. This is especially useful to include inside pages that open new windows to give people the opportunity to close them from within your text rather than the toolbar. The following example will demonstrate this both as a button and hyperlink.
View the Output
Text View
Print View
Mail this Link
Download the Code

<html>
<title>CodeAve.com (JavaScript: Close Window)</title>
<body bgcolor="#FFFFFF">


<a href="javascript:window.close();">Close This Window</a>

<br>

<form>
<input type=button value="Close This Window" onClick="javascript:window.close();">
</form> 


</body>
</html>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
Links | Search Engine db |  Privacy Statement |  Advertising Rates |  Email

CodeAve.com is hosted by MyHosting.com
Donate Food Online with a Mouse Click at TheHungerSite.com
Donate Land Online with a Mouse Click at TheRainForestSite.com
© 1999 - 2010 CodeAve.com
All Rights Reserved