Skip to content

TechXcel.com - provides technical excellence...

Narrow screen resolution Wide screen resolution Increase font size Decrease font size Default font size default color orange color green color
You are here: Home arrow Tech FAQ arrow JavaScript arrow How to Close Browser Window?
How to Close Browser Window? PDF Print E-mail
(2 votes)
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


Image


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.
Comments (0)Add Comment

Write comment
You must be logged in to a comment. Please register if you do not have an account yet.

Copyright 2007. All Rights Reserved.
busy




Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Spurl!Wists!Simpy!Newsvine!Blinklist!Furl!Fark!Blogmarks!Yahoo!Smarking!Netvouz!Shadows!
RawSugar!Ma.gnolia!PlugIM!Squidoo!BlogMemes!FeedMeLinks!BlinkBits!Tailrank!linkaGoGo!
Last Updated ( Friday, 28 September 2007 )
 

Who's Online

User Login

PayPal Donation

Enter Amount:

Syndicate

TechXcel's Friends

Tutorials Garden
Wicolorz
pixel2life

Text Link Add

Statistics

Members: 283
News: 60
Web Links: 6
Visitors: 356765

Google Seach

Google AdSense

TechXcel Referrals

TechXcel's Sponcer...