简单代码:
jsp中代码如下:
<wbr> <div id="dataLoad" style="display:none"><!--页面载入显示--></wbr>
<wbr><wbr><table width=100% height=100% border=0 align=center valign=middle></wbr></wbr>
<wbr><wbr> <tr height=50%><td align=center>&nbsp;</td></tr></wbr></wbr>
<wbr><wbr> <tr><td align=center><img src="<%=request.getContextPath()%>/XXXXX/loading-gif.gif"/></td></tr></wbr></wbr>
<wbr><wbr> <tr><td align=center>数据载入中,请稍后......</td></tr></wbr></wbr>
<wbr><wbr> <tr height=50%><td align=center>&nbsp;</td></tr></wbr></wbr>
<wbr><wbr></table></wbr></wbr>
<wbr> </div></wbr>
<wbr> <script type="text/javascript"></wbr>
<wbr><wbr>$(document).ready(function() {</wbr></wbr>
<wbr><wbr> $("#dataLoad").hide(); //页面加载完毕后即将DIV隐藏</wbr></wbr>
<wbr><wbr> $("#showLoadingDiv").click(function(){$("#dataLoad").show();}); //为指定按钮添加数据加载动态显示:即将DIV显示出来</wbr></wbr>
<wbr><wbr>});</wbr></wbr>
<wbr> </script></wbr>
<input type="button" onClick="query();" id="showLoadingDiv" value="查询"><wbr></wbr>
上传一个截图: