javascript iframe内的函数调用实现方法

时间:2009-07-19    点击:439   
sxmsxm.html

复制代码 代码如下:

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


main.html

复制代码 代码如下:

<iframe id="sxm" src="sxmsxm.html" width='100' height='100'></iframe>


在main.html中执行 sxmsxm.html中的sonfun() 有两种方式

1、 sxm.sonfun()

2、document.getElementById("sxm").contentWindow.sonfun();
Prototype Template对象 学习
Prototype Number对象 学习
Prototype ObjectRange对象学习
Prototype RegExp对象 学习
Prototype Class对象学习
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved