Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library


Category: Javascript Codes Library >> Forms, Radio, Buttons, Check Box >> Close Popup Window

Code Snippet </> Info

Snippet Name: Close Popup Window

Description: A close popup window function that allows the visitor to easily close the window.

Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser


Author: SnapBuilder <>

Last Modified: 2015-03-19 19:26:46

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor

  About Copying
Copied To Clipboard!

<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="">Close Popup Window</a> page. ] </div> </body> </html>

[ Snippet Options ]


© 2002 -  Snap Builder Public Codes Library