|
How to Close Browser Window? |
|
|
|
|
Written by Chetankumar Akarte
|
|
Monday, 14 May 2007 |
How to Close Browser Window?
If you want to close any browser window then you can use window.close() method. The method window.close() will attempt to close the window in which the script is executing.
See simple script to …
<p style="text-align:center;font-family:'Trebuchet MS';">
<a href="javascript:window.close();">Close</a></p>
This simple script will close browser window in which it get executed and also worn user as shown in figure
Some time the window.close() alert you but some time don’t. It happens due to your browser’s security setting. It'll work without asking if there is only one location in the browsers history, if there more than one; it prompts the user for confirmation.
Copyright 2007. All Rights Reserved. |
|
Last Updated ( Friday, 28 September 2007 )
|