【注】:不好意思,是低级错误,是create时参数传递的位置不对,不好意思。
打开页面时往往需要传值,比如我:
var wsub=plus.webview.create('maps_map_sub.html','sub',{abc:'abctest',top:topoffset,height:'60px',position:'absolute',scrollIndicator:'none',background:'transparent'});
wsub.show();
这样打开一个webview,里面我看说明,可以传值,这里我传递了:abc='abctest'
然后我在这个新开的html中用:
var ws = plus.webview.currentWebview(); //pw回车可输出plus.webview
alert(ws.abc);
document.getElementById("s1").innerHTML=ws.abc;
代码获取abc的值,为什么 是undefined ????
求助。。。
大家是怎么进行页面间的传值的?
1 个回复
3***@qq.com
请问怎么解决的,求告知