页面弹出遮罩层,给用户提示信息,后台继续操作

时间:2022-09-10 20:39:37

遮罩层代码:

 <!-- 员工正在导入,请勿关闭页面.......提示秘书勿关闭页面 -->
<div id="DialogDiv" style="display: none">
员工正在导入,请勿关闭页面.......
</div>

点击按钮,onclick操作:

<input type="submit" class="submitType_3" value="开始导入"  id="yuangongguanli" onclick="ShowCommDialog('DialogDiv',400)" />

ShowCommDialog方法如下

 function ShowCommDialog(thisObjID,thisObjWidth) {
$("#dialogBG").css({ display: "block", height: $(document).height()});
var yscroll = document.documentElement.scrollTop;
$("#" + thisObjID ).css("width", thisObjWidth+"px");
$("#" + thisObjID ).css("top", ($(window).height()-500)/2 + "px");
$("#" + thisObjID ).css("left", " "+($(window).width()-thisObjWidth)/2 + "px");
$("#" + thisObjID ).css("display", "block");
document.documentElement.scrollTop = 0;
 }