mui 几个基本用法

mui.plusReady(function() {
	plus.screen.lockOrientation("portrait-primary"); //禁止横屏
	document.addEventListener("netchange", wainshow, false);
	function wainshow() {
		if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
			mui.toast("网络异常,请检查网络设置!");
			  $('.main-container').remove();
//              $("
刷新
").appendTo('body'); $('.no_network').show(); $('.reload').click(function(){ location.reload() }) } } wainshow(); //监听安卓返回键 mui.oldback = mui.back; var clickNum = 0; mui.back = function(event) { clickNum++; if(clickNum > 1) { plus.runtime.quit(); } else { mui.toast("再按一次退出应用"); } setTimeout(function() { clickNum = 0 }, 1000); return false; }

 

你可能感兴趣的:(JS框架应用)