#fullbg {
background-color:gray;
left:0;
opacity:0.5;
position:absolute;
top:0;
z-index:1500;
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity:0.5;
display:none;
}
<div id="fullbg">
<table style="width:100%;height:100%;"><tr>
<td align="center" valign="middle">
<table>
<tr>
<td align="center" style="text-align:center;">上传正在进行,请等待.......</td>
</tr>
<tr>
<td>
<div style="width:190px;height:14px;background:url(${pageContext.request.contextPath}/test/5-121204193R1-50.gif);"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
//显示灰色 jQuery 遮罩层
function showBg() {
var bh = $(window).height();
var bw = $(window).width();
$("#fullbg").css({
height:bh,
width:bw,
display:"block"
});
//$("#dialog_mm").show();
}
//关闭灰色 jQuery 遮罩
function closeBg() {
$("#fullbg,#dialog_mm").hide();
}
</script>