jq(window).bind('beforeunload',function(){
if (true) {
//do something
return "are you sure leaving"
} else {
// do something else
}
})
var tabbarcloseId = parent.xtabbar.tabbar.attachEvent("onTabClose", function(id){
if(id==parent.activeId){
alert("close");
return false;
}else{
return true;
}
})
alert(parent.activeId);
//parent.xtabbar.tabbar.detachEvent(tabbarcloseId);
function refreshTab(){
alert("refresh");
alert(activeId);
if(xtabbar.tabbar.getActiveTab() == activeId){
alert(activeId);
}else{
xtabbar.tabbar.forceLoad(xtabbar.tabbar.getActiveTab());
}
}
标签:改动,parent,xtabbar,else,activeId,tabbar,后台,alert,页面 From: https://blog.51cto.com/u_16092550/6234188