How to learn Javascript:javascript learning-location

Source: Internet
Author: User

Location represents the URL of the document that the window is currently displaying:
The Location object's ToString () method returns the value of the HREF property, which you can use location instead of Location.href
Properties of Location:
Href,protacol,host,hostname,port,pathname,search (representing each part of the URL, respectively)
To load a new document:
Replace ();(replaces the current document in history)
Assign (); (New document in history)
Location = "url"; (relative address, absolute address)
Location = "#top" (jumps to the top of the page or jumps to the location of the specified ID)
Location.search = "? page=" + (pagenum+1); (New parameter Access address)
This article links http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20130527/38066.html

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.