In the parent window, operate iframe: window. frames ["iframeChild" ].doc ument // If the iframe id is iframeChild
Operate the parent window in the Child Window: zookeeper parent.doc ument
So, if you want to use jquery, how can we use jquery to obtain iframe? The following is a collection method.
The object to obtain the page is actually added with the jquery selector outside the dom method:
In the parent window, operate iframe: $ (window. frames ["iframeChild" ].doc ument) // If the iframe id is iframeChild
Operate the parent window in the Child Window: parent (window.parent.doc ument)
Next we can continue to get the dom in iframe.
There are two methods to obtain the dom object in iframe:
1 $ (window. frames ["iframeChild" 2.16.doc ument). find ("# child ")
2 $ ("# child", window. frames ["iframeChild" mongo.doc ument)
1. In the parent window, select all radio buttons in IFRAME.
$ (Window. frames ["iframeChild" cmd.doc ument). find ("input [@ type = 'Radio ']"). attr ("checked", "true ");
2. in IFRAME, select all radio buttons in the parent window
Vertex (w.w.parent.doc ument). find ("input [@ type = 'Radio ']"). attr ("checked", "true ");