function activePage(o) {
// var self = plus.webview.currentWebview();
var w = plus.webview.getWebviewById(o.targetTab);
if (w == null) {
w = plus.webview.create(o.targetTab, o.targetTab, {
top: AZOON_TITLE_HEIGHT,
bottom: AZOON_STATUS_HEIGHT
});
self.append(w);
plus.nativeUI.showWaiting('正在加载...')
}
plus.webview.hide(activeTab);
function onShowed() {
if (!inited) {
inited = true;
setTimeout(plus.navigator.closeSplashscreen,1000);
}
activeTab = o.targetTab;
plus.nativeUI.closeWaiting();
}
w.show('auto',600,onShowed);
// onShowed();
}
页面显示出后,onShowed不会被调用。以上代码在<body>中。
求大神解答。
2 个回复
funnywwh (作者)
怎么就没有人回答呢?
funnywwh (作者)
最后用 w.addEventListener('loaded',onShowed);解决。
这个事件更好,还可以看到动画。