1、父页面添加自定义监听事件
window.addEventListener('doit', function(e){ //获取参数值 var imagePath = e.detail.imagePath; });
2、子页面
//获得父页面的webview var view = plus.webview.currentWebview().opener(); mui.fire(view,'doit',{ imagePath:imagePath }); mui.back()
1、父页面添加自定义监听事件
window.addEventListener('doit', function(e){ //获取参数值 var imagePath = e.detail.imagePath; });
2、子页面
//获得父页面的webview var view = plus.webview.currentWebview().opener(); mui.fire(view,'doit',{ imagePath:imagePath }); mui.back()
转载于:https://www.cnblogs.com/xuxiaozhi/p/8651811.html