在父頁面中新增方法:
function switchTab(tab){
plus.webview.hide(activeTab);
activeTab= tab;
plus.webview.show(tab);
var current = document.querySelector(".mui-bar-tab>.mui-tab-item.mui-active");
current.classList.remove('mui-active');
mui.each(mui(".mui-tab-item"),function(index,item){
if(item.href.indexOf(tab)>0)
{
item.classList.add('mui-active');
}
})
}
在子頁面進行呼叫:
var w = plus.webview.getWebviewById("Hbuilder");
w.evalJS("switchTab('gonggao/gonggao_list.html')")