mui 窗体切换

手机实现窗体切换

1、在5+环境下(即H5app)

先初始化:

mui.init({
subpages:[{
url:"page1.html",//子页面HTML地址,支持本地地址和网络地址
id:"subpage1",//子页面标志
styles:{
top:40,//子页面顶部位置
/*bottom:subpage-bottom-position,//子页面底部位置
subpage-width,//子页面宽度,默认为100%
height:subpage-height,//子页面高度,默认为100%
......*/
}
},{ /*page2*/ }
}]
});

  再通过点击切换

all.addEventListener("tap",function(){
	  		console.log(plus.webview.currentWebview());
	  		plus.webview.getWebviewById("subpage2").show();
	  	})

2、在非5+条件(微信浏览器、手机浏览器)

plus代码不执行!!!

原文地址:https://www.cnblogs.com/kaixin3946/p/5648953.html