Home >Web Front-end >JS Tutorial >jquery gets the dom object in the iframe (two methods)_jquery
Operate the iframe in the parent window: $(window.frames["iframeChild"].document) //If the id of the iframe is iframeChild
Operate the parent window in the child window: $(window.parent.document)
Next, you can continue to obtain the dom in the iframe.
There are two ways to get the DOM object in the iframe
1 $(window.frames["iframeChild"].document).find("#child")
2 $("#child",window.frames["iframeChild"].document)
1. Select all radio buttons in the IFRAME in the parent window