提示用戶系統正忙_web方式

頁面上要有下面這段html代碼:

Html代碼 
<p id="BusyMsg" align="center" style="z-index:101;left:25%;top:45%;width:50%;height:100; position:absolute; display:none;background:#F7F7F7; background-color: #F7F7F7; border: 1px solid #4284F7;"> 
    <table height="100%" align="center"> 
        <tr> 
            <td><img src="<%=ctx%>/images/loading.gif" width="16" height="16"/></td> 
            <td><label id='MsgText'></label></td> 
        </tr> 
    </table> 
</p> 
 
<p id="BusyDiv" style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:100; display:none;"> 
    <table style="width:100%;height:100%;background-color: transparent; "> 
        <tr><td></td></tr> 
    </table> 
</p> 


加上這些javascript代碼:
Js代碼 
function onLoading(){ 
 
    window.document.all.MsgText.innerHTML = "正在查詢數據,請稍候……"; 
    window.document.all.BusyMsg.style.display = ""; 
    window.document.all.BusyDiv.style.display = ""; 

 
function afterLoading(){ 
     
    window.document.all.MsgText.innerHTML = ""; 
    window.document.all.BusyMsg.style.display = "none"; 
    window.document.all.BusyDiv.style.display = "none"; 

作者“bbjava”

You May Also Like