Difference between revisions of "JavaScript History Object"
From Techotopia
(New page: The JavaScript History object is a child of the Window object and holds information about the URls visited before and after the current URL. The object has the following methods and prop...) |
m (Text replacement - "<table border="0" cellspacing="0"> " to "<table border="0" cellspacing="0" width="100%">") |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | The JavaScript History object is a child of the Window object and holds information about the | + | |
+ | <htmlet>ezoicbottom</htmlet> | ||
+ | <hr> | ||
+ | <table border="0" cellspacing="0" width="100%"><tr> | ||
+ | <td width="20%">[[JavaScript Location Object|Previous]]<td align="center">[[JavaScript Essentials|Table of Contents]]<td width="20%" align="right">[[JavaScript Arrays|Next]]</td> | ||
+ | <tr> | ||
+ | <td width="20%">JavaScript Location Object<td align="center"><td width="20%" align="right">JavaScript Arrays</td> | ||
+ | </table> | ||
+ | <hr> | ||
+ | |||
+ | |||
+ | <htmlet>jscript</htmlet> | ||
+ | |||
+ | |||
+ | <htmlet>adsdaqbox_flow</htmlet> | ||
+ | The JavaScript History object is a child of the Window object and holds information about the URLs visited before and after the current URL. | ||
The object has the following methods and properties: | The object has the following methods and properties: |
Latest revision as of 20:12, 27 October 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).