Being on the tightrope is living; everything else is waiting. Karl Wallenda

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

Maggie said on 09.12.2010. 19:04

Hi! I need to assign Left Arrow to Back button and Right Arrow Key to Left button. I know there are key codes for the arrow keys. How do I put it all together so that my OLT course user can navigate advance a page or go back a page in the course?

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

:

:

:


9 + 5 =

Articles RSS feed

Page last (manually) updated: October 14, 2011.