在body里打开一个iframe页面,想要调取打开的这个页面里的函数:

$('iframe')[0].contentWindow.sonFn(canshu);

[0]:比如在index.html页面里,打开了n多个iframe页面,那[0]是获取的第一个iframe页面。

sonFn:是在这个iframe这个页面里的函数

canshu:可以往子页面里面传参数

启主要作用的函数:contentWindow

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-08-19
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2021-06-15
相关资源
相似解决方案