Jquery js call iframe parent window and child window elements

  • 2020-03-30 03:36:47
  • OfStack

1. Jquery gets the code of the parent page element on the iframe child page as follows:

$(" # objid ", the parent document)

2. Jquery gets the elements of the iframe child page on the parent page

The code is as follows:

$(" # objid, "the document. The frames (' iframename). The document)

3. Js gets the parent page element in the iframe child page as follows:

Indow. Parent. Document. GetElementByIdx_x (" element id ");

4. Js gets the iframe child page element in the parent page as follows:

. Window frames [r]. "iframe_ID" document. The getElementByIdx_x (element "id");

5. Call the superclass function in the subclass iframe:

Window. The parent. Func ();


Related articles: