JavaScript - An open source scripting language, it allows the creation of dynamic web page content.  Home Web Programming JavaScript Close Window
Your Ad Here

Close Window


Close WindowAdd this nifty script to your pop up pages for the users to close them :). Six great styles that should work if done properly.

Closing a Regular Window from a Link


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

Closing a Regular Window from an Image

<a href="javascript:window.close()">
<img border="0" src="/img_articles/6729/closingwindows.gif" width="95" height="46">
</a>

Closing a Regular Window from a Button

<form>
<input type="button" value="Close" onClick="window.close()">
</form>

Closing a Frameset Window from a Link

<a href="javascript:top.window.close()">Close</a>

Closing a Frameset Window from an Image

<a href="javascript:window.close()">
<img border="0" src="/img_articles/6729/closingwindows.gif" width="95" height="46">
</a>

Closing a Frameset Window from a Button

<form>
<input type="button" value="Close" onClick="top.window.close()">
</form>


Author's URL: Ghostbone.com
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Web programming � everything from the basics of visual design and architecture to the specifics of applications, graphics, and scripting. More Web Programming: Most Popular Materials | Fresh Materials | More JavaScript Tutorials at LearnPHP.org

Add comments to "Close Window"

Only registered users can write comment

No comments yet...