遮罩层代码:
<!-- 员工正在导入,请勿关闭页面.......提示秘书勿关闭页面 -->
<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;
}