提交的时候过程很长,出现等待处理效果。

it2022-05-09  38

在提交的时候过程很长,为了防止用户再次点击而且为了界面友好可以用一个层遮住所有按钮再显示个提示信息,等服务器端处理完成再导航到本页(location.href='地址')就可以:     <div   id="doing"   runat="server"   style="Z-INDEX:   12000;   LEFT:   0px;   VISIBILITY:   hidden;   WIDTH:   100%;     POSITION:   absolute;   TOP:   300px;   HEIGHT:   100%">                                     <table   width="100%"   height="100%">                                             <tr   align="center"   valign="middle">                                                     <td>                                                             <table   width="169"   class="font3"   height="62"   bgcolor="#6699ff"   style="FILTER:   Alpha(Opacity=75);   WIDTH:   169px;   HEIGHT:   62px">                                                                     <tr   align="center"   valign="middle">                                                                             <td>页面提交中,请等待<br>                                                                                     Please   wait                                                                             </td>                                                                     </tr>                                                             </table>                                                     </td>                                             </tr>                                     </table>                             </div>     pageload里面这么写:this.Button1.Attributes.Add("onclick","document.getElementById('doing').style.visibility='visible';");       ,等操作结束重定向了后页面重新加载一次,这个层也就消失了。。。

转载于:https://www.cnblogs.com/nnkook/archive/2010/03/28/1698910.html


最新回复(0)