此遮罩用的是jeasyui源码里的:
<html>
<head>
<script src="jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="jquery.json-2.4.js" type="text/javascript"></script>
<script src="jquery-easyui-1.3.2/jquery.easyui.min.js" type="text/javascript"></script>
<!--<script src="mask.js" type="text/javascript"></script> -->
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.2/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.2/themes/icon.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.2/demo/demo.css">
<script type="text/javascript">
$(function(){
$("#clickme").click(function(){
$("<div class=\"datagrid-mask\"></div>").css({display:"block",width:document.body.clientWidth,height:document.body.clientHeight}).appendTo("body");
$("<div class=\"datagrid-mask-msg\"></div>").html("正在处理,请稍候。。。").appendTo("body")
.css({display:"block",left:(document.body.clientWidth - 190) / 2,top:(document.body.clientHeight - 45) / 2});
});
});
</script>
</head>
<body>
<button id="clickme">点我遮罩</button>
<body>
</html>
$("body").find(".datagrid-mask-msg").remove(); $("body").find(".datagrid-mask").remove();