Back and Forward
by Sanju[ Edit ] 2009-11-08 15:45:10
Back and Forward
Sometimes we may ask our visitors to use browser's
Back and
Forward buttons to navigate the site as in the following example :
Below is the example code:
<form mothod="post">
<input type="button"
value="BACK"
OnClick="history.go( -1 );return true;">
<input type="button"
value="FORWARD"
OnClick="history.go( 1 );return true;">
</form>
If you prefer hyperlinks to buttons, use the following tags instead:
<A HREF="javascript:history.go(-1)">
Go back
</A>
<A HREF="javascript:history.go(1)">
Go forward
</A>