CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Tuesday, October 03, 2006

Back Button / Forward Button in JavaScript

<input id="btnBack" type="button" 
value="Back" language="javascript" onclick="fnBack()" />
<input id="btnForward" type="button"
value="Forward" language="javascript" onclick="fnForward()"
function fnBack()
{
history.go(-1); //GOES BACK BY ONE PAGE
}
function fnForward()
{
history.go(1); //GOES FORWARD BY ONE PAGE
}

Post a Comment