Difference between revisions of "JavaScript History Object"
From Techotopia
m (Text replacement - "<google>ADSDAQBOX_FLOW</google>" to "<htmlet>adsdaqbox_flow</htmlet>") |
m (Text replacement - "<google>BUY_JAVASCRIPT</google>" to "<htmlet>jscript</htmlet>") |
||
Line 9: | Line 9: | ||
− | < | + | <htmlet>jscript</htmlet> |
Revision as of 22:24, 1 February 2016
Previous | Table of Contents | Next |
JavaScript Location Object | JavaScript Arrays |
Purchase and download the full PDF version of this JavaScript eBook for only $8.99 |
The object has the following methods and properties:
- history.length - a property containing the numner of URLs held in the history.
- history.go() - takes a postive or negative number as an argument to specify how many changes back or forward in the history to go. For example history.go(-4) is equivalent to pressing the Back buttonm in the browser 4 times.
- history.back() - equivalent to pressing the browser Back button (loads the previous page from the history list).
- history.forward() - equivalent to pressing the browser Forward button (loads the next page from the history if it exists).