Home > Article > Web Front-end > iframe extraction and changing parent page elements_html/css_WEB-ITnose
1: Use the jquery method to obtain
1: Get the value
$(window.parent.document ).find("#second_navigator").html();
2: Change the parent page element
$(window.parent. document).find("#second_navigator").html("I am passing the value from the iframe");
Two: javaScript Method
1: Value
window.parent.document.getElementById("second_navigator").innerHTML;
2: Change the parent page element
window.parent.document.getElementById("second_navigator").innerHTML="I passed the value from the iframe" ;