手机实现窗体切换

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

先初始化:

mui.init({
subpages:[{
url:"page1.html",//子页面HTML地址,支持本地地址和网络地址
id:"subpage1",//子页面标志
styles:{
top:40,//子页面顶部位置
/*bottom:subpage-bottom-position,//子页面底部位置
width: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代码不执行!!!

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-07-18
  • 2021-12-05
猜你喜欢
  • 2021-10-04
  • 2021-10-31
  • 2021-09-29
  • 2021-07-25
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
相关资源
相似解决方案