<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<script src="js/mui.min.js"></script>
<link href="css/mui.min.css" rel="stylesheet"/>
<script type="text/javascript" charset="utf-8">mui.init();</script>
<style type="text/css">/*修改自定义模板样式*/
.mui-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 998;
background-color: rgba(255,0,0,.3);
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav"><!--顶部导航栏-带返回键-->
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">测试属性</h1>
</header>
<div class="mui-content">
<button type="button" onclick="showMask();">遮罩事件</button>
</div>
<script type="text/javascript">/*遮罩蒙版*/
function showMask(){/*绑定处理事件*/
var mask = mui.createMask(callback);/*创建蒙版,保存到mask中;callback1-作用是点击蒙版执行结束*/
mask.show();/*调用展示属性*/
}
function callback(){
/*mask.close();//关闭遮罩*/
mui.toast('您取消了操作');
}
</script>
</body>
</html>