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!