The History
object represents the browsers history list, which can allow script functions to access the browsers history list.
The History object contains a list of URLs recently visited by the user. It can be accessed to manipulate specific navigation methods.
History Properties
Length
The length
property returns the number of current entries in the current history object (i.e. the browser's history list).
History Methods
Back
The back
method can be used to load the URL of the document that the browser previously visited. Essentially, it is the same as if the user pressed the 'Back' button on their browser toolbar. I.e.
history.back()
Forward
The Forward
method is used to load the URL that is next in the document list (NOTE : This assumes that the user has already navigated 'back' through their history list).
history.forward()
Go
The Go
method acts different when used in Netscape or Internet Explorer. In Netscape, the Go
method can be used, together with a negative or positive integer value to navigate to any URL present in the history list (assuming that the history object contains enough entries to navigate the required integer value). For example :
history.go(3)
would navigate to the URL three entries ahead of the current document, while :
history.go(-2)
would navigate to the URL 2 entries previous to the current document in the history object.
In Internet Explorer, the Go
method is used with a single integer value which represents the absolute position in the history list of the URL to navigate to. For example :
history.go(3)
would navigate to the URL third in the history list.
History Events
The History object has no events.
© 1995-1998, Stephen Le Hunte
file: /Techref/language/html/ib/Scripting_Reference/histo.htm, 3KB, , updated: 2007/2/23 02:56, local time: 2024/12/3 20:13,
3.145.86.5:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/Techref/language/html/ib/Scripting_Reference/histo.htm"> The History object</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.