methodname is one of the methods listed below.
property of
描述
the history object is a linked list of urls the user has visited, as shown in the navigator's go menu.
properties
methods
event handlers
例子
example 1. the following example goes to the url the user visited three clicks ago in the current window.
example 2. you can use the history object with a specific window or frame. the following example causes window2 to go back one item in its window (or session) history:
example 3. the following example causes the second frame in a frameset to go back one item:
example 4. the following example causes the frame named frame1 in a frameset to go back one item:
example 5. the following example causes the frame named frame2 in window2 to go back one item:
相关
host property
a string specifying the hostname:port portion of the url.
语法
1. links[index].host 2. location.host
index is an integer representing a link object.
property of
描述
the host property specifies a portion of the url. the host property is the concatenation of the hostname and port properties, separated by a colon. when the port property is null, the host property is the same as the hostname property.
you can set the host property at any time, although it is safer to set the href property to change a location. if the host that you specify cannot be found in the current location, you will get an error.
see section 3.1 of rfc 1738 for complete information about the hostname and port.
例子
see the 例子 for the href property.