A brief analysis on the _javascript skill of location.href calling function across Windows

Source: Internet
Author: User

Location.href this thing is often used for jumps, location is both a Window object's property and a Document object's property.

JavaScript Hash Property--Returns the content after the # symbol in the URL
JavaScript Host Property--Returns the domain name
JavaScript Hostname Property--Returns the primary domain name
JavaScript href Attribute--Returns the full URL of the current document or sets the URL of the current document
JavaScript Pathname Property--Returns the part of the URL after the domain name
JavaScript Port Property--Returns the port in the URL
JavaScript protocol Property--Returns the protocol in the URL
JavaScript Search Properties--Returns the query string in the URL
JavaScript assign () function--Sets the URL of the current document
JavaScript replace () function--Sets the URL of the current document and removes the URL from the address list of the history object
JavaScript Reload () function-Reload the current document
JavaScript toString () function--Returns the current value of the Location object's href property
There are several different ways to invoke, to get their own a bit messy, this one-time write an example, completely no longer confused. This time with 3 pages to solve the problem:

3.html this window:

 

2.html Parent window:

 

1.html ye window:

 

Three pages in the same directory, just click on it to know what's going on!

jquery's operations on the IFRAME are mainly through

  $("iframe").contents().find("#id1");

Perform cross-IFRAME operations.

The above is the entire content of this article, I hope to help you, thank you for the support of cloud habitat community!

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.