当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > DOM History
The History object is an object that can be accessed through the history property of the Window object.
历史对象是一个可以通过Window的历史属性来被访问的对象
The History object consists of an array of URLs. These URLs are the URLs the user has visited within a browser window.
历史对象包括URLs组,URLs是用户在一浏览器窗口内所访问过的URL地址
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Property属性 | Description描述 | IE | F | N | W3C |
---|---|---|---|---|---|
length | Returns the number of elements in the history list 返回history表中元素的数量 | 3 | 1 | 2 |
Method 方法 | Description 描述 | IE | F | N | W3C |
---|---|---|---|---|---|
back() | Loads the previous URL in the history list (same as clicking the Back button and to history.go(-1)) 从历史列表中装入前一个 URL。 | 3 | 1 | 2 | |
forward() | Loads the next URL in the history list (same as clicking the Forward button and to history.go(1)) 从历史列表中装入下一个 URL。 | 3 | 1 | 2 | |
go(number|"URL") | Loads a specified URL from the history list 从历史列表中装入 URL。 | 3 | 1 | 2 |