This paper illustrates the method of jquery in the operation of the JS function in the IFRAME. Share to everyone for your reference, specific as follows:
1, jquery operation of the elements in the IFRAME (2 ways)
var tha = $ (window.frames["core_content"].document). Find ("#trewuuu"). html ();
var THB = $ ("#core_content"). Contents (). Find ("#trewuuu"). html ();
2, the operation of the parent interface elements (header: The ID of an element)
$ (' #header ', parent.document). Text ()
3. JS calls the JS function in the IFRAME (2 kinds)
window.frames["Core_content"].window.testiframe2 ("one");
document.getElementById ("Core_content"). Contentwindow.testiframe2 ("11");
4, jquery call the IFrame JS function (with parameters will have the return value)
$ ("#core_content") [0].contentwindow.testiframe2 ("11");
Precautions:
To be in the same domain name as the contained IFRAME (because the domain cannot be cross-domain)
More interested readers of jquery related content can view the site topics: "jquery operation iframe Tips Summary", "JQuery Extended Skills Summary", "jquery common Plug-ins and Usage summary", "jquery drag and drop effects and tips summary", "jquery Table" ( Table) Summary of operational techniques, "Summary of Ajax usage in jquery", "jquery common Classic Effects Summary", "jquery animation and special effects usage Summary" and "jquery Selector usage Summary"
I hope this article will help you with the jquery program design.