Categories:

Site Search:

Find me at:


Javascript Back Button

This simple script operates the same way as the back button in a visitor's browser.


<a href="#" onClick="history.go(-1)">Back</a> 

Where possible, you should also include the previous page in the href section of the link. For instance in PHP you can access the referrer as below:


<?php
$referrer=$_SERVER['HTTP_REFERER'];
?>

21.02.2007. 19:07

No responses yet.

Questions, comments, insults or praise? Have your say:

:

:

:


6 + 3 =

Articles RSS feed

Page last (manually) updated: October 20, 2008.