<script type="text/javascript">
mui.init({
subpages:[{
url:'sub1.html',
id:'sub1.html',
styles:{
top:"44px"
}
},
{
url:'sub2.html',
id:'sub2.html',
styles:{
top:"44px"
}
}
]
});
mui.plusReady(function(){
var sub1=plus.webview.getWebviewById('sub2.html');
sub1.hide(); });
});
在主页上初始化两个子页面,然后在plusReady中getWebviewById一下,再hide就报错为空对象。代码如上。页面元素啥也没有。每次重启程序就报错:Uncaught TypeError: Cannot call method 'hide' of null
0 个回复