We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

jonhenshaw on 11/04/06


Tagged

javascript button back


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

rnrleachryan
fantomex
vali29


Back Button


Published in: JavaScript 


URL: http://javascript.internet.com/navigation/back-button.html

Still wondering how to create a back button from a link or button? It's easy to do and doesn't even take a whole line!

  1. <a href="#" onClick="history.go(-1)">Back</a>
  2. <input type=button value="Back" onClick="history.go(-1)">
  3.  
  4. <!-- Change the value of -1 to any number of pages you would like to send your visitors back -->

Report this snippet 

You need to login to post a comment.