execScript调用其他页面方法并传值-ApiCloud

2019-11-05  本文已影响0人  QinHaolei
//在名为'indexWin'的window中找到名为'indexFrame'的frame,
//并在该frame中执行changeCity脚本
var jsfun = 'funcGoto();';
api.execScript({
    name: 'indexWin',
    frameName: 'indexFrame',
    script:  'changeCity("'+ data +'","'+ list +'");'
});
//indexFrame.html
<script>
function changeCity(data,list){
   console.log(data+list);
}
</script>
上一篇下一篇

猜你喜欢

热点阅读