纯记录-后台刷新页面相关改动点
程序员文章站
2024-01-17 17:03:58
...
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()); } }
推荐阅读