(兼容IE、Firefox、Chrome等主流浏览器)
<body>
<Div id="DivLocker"></Div>
其他html元素....
<script language="text/javascript">
$('#DivLocker').css({
"position": "absolute",
"margin-left": "1px",
"margin-top": "1px",
"background-color": "#000000",
"height": function () { return $(document).height(); },
"filter": "alpha(opacity=30)",
"opacity": "0.3",
"overflow": "hidden",
"width": function () { return $(document).width(); },
"z-index": "999"
});
</script>
</body>
可以自动加载,也可以将其作为一个事件的触发函数。height和width可以自定义设置。效果还可以,用什么插件什么的都太复杂,这个很简单。