Back and Forward - Javascript Views : 421
Tagged in : Javascript
0 0
Send mail
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>
By Sanju, On - 2009-11-08



    Login to add Comments .