To provide a jquery in the IFRAME to get the parent window of an element of the value implementation, this IFRAME with JS is also similar to the need for friends can refer to.
1. Get the class with the specified IFRAME (testiframe) ID testid in the parent window
$ (window.frames["Testiframe"].document). Find ("#testid"). attr (' class ');
2. Get the class with ID TestID in the parent window in the IFRAME
$ (window.parent.document). Find ("#testid"). attr (' class ');
Of the IFRAME framework:
<iframe src= "test.html" id= "Testiframe" width= "$" height= "frameborder=" "0" scrolling= "Auto" ></iframe >
To release the wording of an IFRAME:
Wrapper.iframeremove = function () {
var frame = $ (frames["Showiframe"]) [0];//showiframe refers to the ID of the IFRAME
$ ("iframe", Tophelper.comwin). attr ("src", "About:blank");
Frame.contentWindow.document.write (");//Empty the contents of the IFRAME
Frame.contentWindow.close ();//Avoid IFRAME memory leaks
Frame.remove ();//delete iframe
}