Return to Kroll Design home page

JavaScript Tutorials

« Return

history object

The history object stores locations of prior web pages visited.


<script type="text/javascript">
document.write("history.length is the number of pages currently in history: " + history.length + "<br /><br />");
document.write("<a href='#' onclick='javascript:history.back()'>history.back()</a> is the same as clicking the back button.<br /><br />");
document.write("<a href='#' onclick='javascript:history.forward()'>history.forward()</a> is the same as clicking the forward button.<br /><br />");


« Return

©2012 Kroll Design    781.910.3694
Last modified: 12/31/1969 7:00 PM