js
mui.plusReady(function() {
//打开新页面
document.getElementById("0").addEventListener("click",function(){
mui.openWindow({
url: "examples/guanli.html",
id: "guanli.html",
styles: {
popGesture: "close",
statusbar: {
background: "#f7f7f7"
}
},
show: {
aniShow: aniShow,
duration: 300
}
});
});
html
<nav class="mui-bar mui-bar-tab" id="nav">
<a class="mui-tab-item mui-active" >
<span class="mui-icon mui-icon-home"></span>
<span class="mui-tab-label">首页</span>
</a>
<a class="mui-tab-item" id="0">
<span class="mui-icon mui-icon-paperplane"></span>
<span class="mui-tab-label">管理</span>
</a>
<a class="mui-tab-item" id="1">
<span class="mui-icon mui-icon-compose"></span>
<span class="mui-tab-label">课程表</span>
</a>
<a class="mui-tab-item" id="2">
<span class="mui-icon mui-icon-flag"></span>
<span class="mui-tab-label">任课表</span>
</a>
<a class="mui-tab-item" id="3">
<span class="mui-icon mui-icon-person"></span>
<span class="mui-tab-label">通讯录</span>
</a>
</nav>
点击id=0的tab项目,激活js