History object for JavaScript

Source: Internet
Author: User
History object for JavaScript
The history object is the property of the Window object, and the History object has no events, but there are four properties as follows:
The URL of the document currently displayed in the current window
Lengh it represents the length of the history table
Next represents the following URL in the history table
Provious represents the previous URL in the history table
Description: IE does not support the Current,next and previous properties of history objects
The History object has 3 methods back (), forward (), and Go (), which can invoke documents contained in the history table.
The back () method loads the previous page in the history table, equivalent to the Back button in the browser
The forward () method loads the last page in the history table, equivalent to the Forward button in the browser
The Go () method goes into a specific document in the history table, and can take an integer parameter or a string parameter
When Go (n) n>0, load the nth document of the forward number in the history table; n=0 fashion into the current document; n<0, load the nth document from the back of the history table
Go (string) loads the most recent document in the history table that contains the substring in the URL string. For example, History,go ("characters") loads the most recent document in the URL containing the string characters.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.