ShowMask

<html>
    <head>
<script type="text/javascript">
    function showMask(){
        var a1=document.getElementById("DialogId");
        var a2=document.getElementById("MainId");
        a1.style.display="block";
        a2.style.display="block";
    }

    function hideMask(){
        var a1=document.getElementById("DialogId");
        var a2=document.getElementById("MainId");
        a1.style.display="none";
        a2.style.display="none";
    }
</script>

</head>
<body>
    <div id="DialogId" style="background-color:#dddddd;display:none; z-index:102; left: 50%; top: 50%; margin-left: -140px; margin-top: -70px;  200px; height: 50px; position: absolute;">
        <div id="ContentID" style="height: 50px; margin: 15px 20px; font-size: 15px; font-family: microsoft yahei; text-align: center;line-height:16px; overflow: hidden;">
        <img src="<%=request.getContextPath()%>/images/lodding1.gif" id="lodding" style="margin-right:10px;margin-top:0px;"/><span align="left" style="">正在处理,请稍候...</span>
        </div>
    </div>
    <div id="MainId" style="background-color: rgb(0, 0, 0); left: 0px; top: 0px;  100%; height: 100%; position: absolute; z-index: 100; display: none; opacity: 0.5;filter:alpha(opacity=50);"></div>
</body>
</html>
原文地址:https://www.cnblogs.com/cause/p/3842511.html