Home > Web Front-end > HTML Tutorial > iframe extraction and changing parent page elements_html/css_WEB-ITnose

iframe extraction and changing parent page elements_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:53:27
Original
1363 people have browsed it

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" ;

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template