Two Cool Functions: Back and Close this Window!

Here are two little JavaScript lines that allow you to add a little bit of interactivity to your web site! Handy little buggers too!

Back Link

Users can use the BACK button on their web browser to go back one page, or you can include this little bit of JavaScript on a link within the body of your HTML document. Adding this JavaScript code to your link will take them back the the previously viewed web page.

<a href="javascript:history.go(-1);">BACK</a>

When the user clicks on the link BACK, the JavaScript executes and takes them back one web page.

Close Link

Sometimes you may choose to create a pop up window to display a bit of additional information or to take the user to a new web page. They can click the close button on the new window, or you can use a little JavaScript to allow them to click a link on your page which closes the window. Handy!

<a href="javascript:close();">Close This Window</a>

When the user click on this link, the window will close! Cool!

 

 

 

Contact Us:
949-633-7915
DevGroup@tothweb.com

Photoshop, Illustrator and Image Ready are registered trademarks of Adobe Systems, Inc. Dreamweaver, Flash and
Fireworks are registered trademarks of Macromedia, Inc.
All contents are copyright 1998-2002 by Tothweb and Toth Entertainment. Tothweb is a member of the Toth Entertainment group of companies.
All trademarks are the property of their respective owners. No part of this page may be reproduced without the written consent of Tothweb.
For information or for general inquiries, please write to cservice@tothweb.com.