JOOMLA FICTION LAB
(3 votes)

How to create a BACK LINK with Javascript

Monday, 30 January 2012 14:48
You can easily provide a link back to the previous page to your visitors with this simple code.

The browser stores a history of all pages the user has visited. The history.go(-1) will take the user back 1 page. If you insert history.go(-2) then the back link will take the user back 2 pages and so on.

<a href="#" onclick="history.go(-1);return false;">Back</a> 




Add comment


Security code
Refresh