父页面添加自定义监听事件:(e.detail.xxx)

        window.addEventListener('doit', function(e){
             //获取参数值
            var imagePath = e.detail.imagePath;
        });

 

子页面:

//获得父页面的webview
var view = plus.webview.currentWebview().opener();
mui.fire(view,'doit',{
    imagePath:imagePath
});
mui.back()

 

相关文章:

  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2021-06-12
  • 2018-07-08
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案