Home > Web Front-end > JS Tutorial > body text

Call JavaScript methods in parent page/child page in iframe

高洛峰
Release: 2016-11-28 11:12:26
Original
1372 people have browsed it

Ming: Suppose there are 2 pages, index.html and inner.html. There is an iframe in index.html, and the src of this iframe points to inner.html.
What we have to do now is:
1. Call a js method on inner.html in index.html
2. Call a js method on index.html in inner.html

The implementation code is as follows:

index.html

1.
2.
3.
8.


9.
10.

11.This is index page.
12.
13.
14.

15.
16.
17.


inner.html

1.
2.
3.
8.


9.
10.

11.This is inner page.
12.
13.
14.

15.
16.


Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!