History Object
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).
History Object Properties
Property | Description | IE | F | N | W3C |
---|---|---|---|---|---|
length | Returns the number of elements in the history list | 3 | 1 | 2 |
History Object Methods
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)) | 3 | 1 | 2 | |
forward() | Loads the next URL in the history list (same as clicking the Forward button and to history.go(1)) | 3 | 1 | 2 | |
go(number|"URL") | Loads a specified URL from the history list | 3 | 1 | 2 |