Friday, November 23, 2012

Create a back button on a page


<!DOCTYPE html>
<html>
<head>
<script>
function goBack()
  {
  window.history.back()
  }

function goForward()
  {
  window.history.forward()
  }

</script>
</head>
<body>
<input type="button" value="Back" onclick="goBack()">
<input type="button" value="Back" onclick="goForward()">
<p>Notice that clicking on the Back/Forward button here will not result in any action, because there is no previous URL in the history list.</p>
</body>
</html>

OUTPUT:

  
Notice that clicking on the Back button here will not result in any action, because there is no previous URL in the history list.


0 comments:

Post a Comment

Thanks For Coming The Page.