Close A Window

Below are 13 different ways to close a window with javascript. They include a text link, image link and a form button.

In case you're thinking of doing something sneaky with the onmouseover versions, forget it. Almost all browsers ask the user if they want to close the window before it happens.

Close a regular window with a text link.

Highlight The Source Code Below

Do the same thing with onmouseover.

Highlight The Source Code Below

Close a normal window with an image button.

Highlight The Source Code Below

Do the same thing with onmouseover.

Highlight The Source Code Below

Close a normal window with a form button.

Highlight The Source Code Below

Do the same thing with onmouseover.

Highlight The Source Code Below

Close a frameset window with a text link

Highlight The Source Code Below

Doing the same thing with onmouseover.

Highlight The Source Code Below

Close a framset window uing an image button.

Highlight The Source Code Below

Doing the same thing with onmouseover.

Highlight The Source Code Below

Close a frameset window with a form button.

Highlight The Source Code Below

Doing the same thing with onmouseover.

Highlight The Source Code Below

Close a window by clicking anywhere.

Highlight The Source Code Below



<<< Back



Home Page       This Page Was Last Updated: