appcan.window.evaluateScript({

name,/*主窗口名称,此窗口要先用appcan.window.open打开了,才能找到,此方法才会有效*/

scriptContent,/*要运行的function*/

type/*窗口类型,目前为止不知该填些什么东东,可不填*/

})

例:

假如有三个页面 A.html ,  B.html  ,  C.html 等,要从C.html页面触发B.html页的函数 fun(){alert("已运行函数fun()")}


首先打开网址时先进入 A.html,然后从A.html加个click事件,

appcan.window.open({
name:'B',
data:'B.html',
aniId:'2'
})
打开B.html,再从B.html页面

appcan.window.open({
name:'C',
data:'C.html',
aniId:'2'
})
进入C.html页面,我后在 C.html页面使用这个跨窗口方法
加个事件然后触发:
appcan.window.evaluateScript({
name:'B',
scriptContent:'fun()'
})

 

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2021-06-21
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2022-12-23
  • 2022-01-08
  • 2021-08-18
  • 2022-12-23
  • 2023-01-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案