SoFunction
Updated on 2025-03-01

jquery and js call iframe parent window and child window elements

1. jquery obtains the parent page element code in the iframe child page as follows:

$("#objid", )

2. jquery on parent page Get elements of iframe child page

The code is as follows:

$("#objid",('iframename').document)

The code to get the parent page element in the iframe child page is as follows:

.getElementByIdx_x("elementid");

The code for obtaining the element of the iframe child page on the parent page is as follows:

["iframe_ID"].document.getElementByIdx_x("elementid");

5. Call the parent class function within the subclass iframe:

();