Close Popup Window - A close popup window function that allows the visitor to easily close the window.
Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser
<html> <head> <title>Close Popup Window Javascript Code Snippet</title> </head> <body> <p>A close popup window function is useful when you use a pop-up window on your page, as it allows the visitor to easily close the window.</p> <p>In the body of your document, add the following code snippet where you want the button to appear:</p> <p>A form button code<br /> <form><input type="button" value="Close Window" onClick="javascript:window.close();"></form></p> <p>A text link code<br /> <a href="javascript:window.close();">Click to Close Window</a></p> <br /><br /> <div id="snippet"> [ This code example from <a href="http://snapbuilder.com/code_snippets/copy_code_snippet_40.html">Close Popup Window</a> page. ] </div> </body> </html>