前些天项目碰到这个问题,在ie下可以直接调用iframe里的js函数
如:
document.getElementById('iframedemo').targetfunction();
但是这段代码在firefox下报错,于是上google搜索,发现一个解决办法,在ie和firefox
下均工作正常,代码如下:
document.getElementById('iframedemo').contentWindow.demofunction();
其中iframedemo是iframe的id
相关文章:
-
2021-08-27
-
2021-07-28
-
2022-12-23
-
2021-08-27
-
2022-12-23
-
2022-12-23
猜你喜欢
-
2021-08-27
-
2021-08-27
-
2021-10-11
-
2021-07-12
-
2021-08-27
-
2021-08-27
-
2022-12-23
相关资源
-
下载
2022-12-28
-
下载
2021-06-24
-
下载
2023-01-04