Home > Web Front-end > JS Tutorial > Implementation method of function calling within javascript iframe_javascript skills

Implementation method of function calling within javascript iframe_javascript skills

WBOY
Release: 2016-05-16 18:49:59
Original
1081 people have browsed it
sxmsxm.html

Copy code The code is as follows:

<script> function sonfun() { alert('ok'); } </script>


main.html

Copy code The code is as follows:




There are two ways to execute sonfun() in sxmsxm.html in main.html

1. sxm.sonfun()

2. document.getElementById("sxm").contentWindow.sonfun();
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