This is one of the simpler things to do in JavaScript, but it's a good way of demonstrating how you can use the onclick event in various form elements to increase the functionality of your web page or application.
There are two ways to force the browser to go back to the previous page visited. These are detailed below.
Either one of those will act the same as the user clicking the back button on the browser. [tt]history.go[/tt] is a little more powerful, because you can jump back more than one entry in JavaScript's [tt]history[/tt] collection, but for most simple web pages, [tt]history.back[/tt] will work just fine.
More info can be found at http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/history.html. DevEdge is a pretty good general resource for JavaScript stuff.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.