Value of the iframe Parent and Child pages, and value of the iframe Parent and Child
Use jquery to operate iframe
1. The content contains two ifame
<Iframe id = "leftiframe"... </iframe>
<Iframe id = "mainiframe... </iframe>
In leftiframe, jQuery changes the src code of mainiframe:
$ ("# Mainframe", parent.doc ument. body). attr ("src", "http://www.jb51.net ")
2. If the content contains an ifame with the ID of mainiframe
<Iframe id = "mainifame"...> </ifame>
Ifame contains a someID
<Div id = "someID"> you want to get this content </div>
Get someID content
$ ("# Mainiframe "). contents (). find ("someID" ).html () html or $ ("# mainiframe "). contains (). find ("someID "). text () Value
3. In the parent window, select all radio buttons in IFRAME.
$ (Window. frames ["iframe1" cmd.doc ument). find ("input [@ type = 'Radio ']"). attr ("checked", "true ");
Then the find method is still used to select the id.
$ (Window. frames ["iframe1" cmd.doc ument). find ("# id ")