The history Object s Methods


The history Object's Methods

You can find the methods of the history object in Table 10.12; these methods enable you to navigate around in the history list at will.

Table 10.12. The Properties of the history Object

Method

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

back

x

x

x

x

x

x

x

x

x

x

 

Returns: Nothing

 

Navigates back one place in the history list. Before Netscape Navigator 4.0, you could navigate the contents of a frame back before the beginning of the history list, which was an error; but in Netscape Navigator 4+, that's been fixed. In the Internet Explorer, on the other hand, the history object does not store frame URLs, only the URLs of entire pages. Syntax: back() . See "Using the go , forward , and back Methods" in this chapter for an example.

forward

x

x

x

x

x

x

x

x

x

x

 

Returns: Nothing

 

Navigates forward one location in the history list, displaying that location in the browser.

 

Syntax: forward() . See "Using the go , forward , and back Methods" in this chapter for an example.

go

x

x

x

x

x

x

x

x

x

x

 

Loads a URL from the history list.

 

Syntax: history.go( location ) , where location is an integer that specifies the relative position in the history list you want to go to, or a string holding the URL of the location you want to navigate to. (This must be an URL already in the history list.) To navigate back two locations, for instance, use 2. See "Using the go , forward , and back Methods" in this chapter for an example.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net