The code used in the project is shown first so that it can be used later, and it will be understood directly.
var li_divs = parent.$ ("#servicelist") [0].contentwindow.$ ("#ccList. Li.div");
Li_divs.each (function () {
if ($ (this). Find ("a"). EQ (0). attr ("Attrid") ==$ ("#id"). Val ()) {
$ (this). Find ("a"). EQ (0). Text ($ ("#name"). Val ());
}
});
The following content is reproduced from
Key points of knowledge
1:document.getelementbyid ("II"). After Contentwindow gets the IFrame object, it can get the Window object containing the page through Contentwindow. The page elements can then be accessed normally;
2:$ ("#ii") [0].contentwindow if the IFRAME is obtained with the jquery selector, a "0" is required;
3:$ ("#ii") [0].contentwindow.$ ("#dd"). Val () can then use the jquery selector to perform the page operation after the window object of the IFrame is obtained;
4:$ ("#ii") [0].contentwindow.hellobaby= "DSAFDSAFSDAFSDAFSDAFSDAFSADFSADFSDAFSADFDSAFFDSAAAAAAAAAAAAA"; You can pass parameters to the IFRAME page in this way, you can get the value on the IFRAME page Window.hellobaby, Hellobaby is a custom variable;
5: In the IFRAME page through the parent can get the main page window, and then you can normally access the elements of the Father page;
6:parent.$ ("#ii") [0].contentwindow.ff; The sibling iframe is called between pages, need to get the Father's window first, and then call the same iframe to get the window to operate;
jquery parent page Face page sibling page call