Jquery遮罩ShowLoading組件

來源:互聯網
上載者:User

標籤:jquery   遮罩   showloading   

1、意義

     開發項目中,前台的頁面要發請求到伺服器,伺服器響應請求返回資料到前台,這段時間,有可能因為返回的資料量較大導致前台頁面出現短暫性的等待,此時如果使用者因不知情而亂點擊有可能造成邏輯混亂,所以此時需要在載入資料中將前台進行提示在載入資料中,利用jquery的遮罩群組件可以完成這個功能需求。


2、實現步驟

    (1)、下載showLoading.css    jquery.showLoading.min.js 兩個檔案。

   (2)、在jsp中引入這兩個檔案

<link href="style/showLoading.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="js/jquery.showLoading.min.js"></script>

   (3)、在非同步請求中使用這個組件

function showloading(url,data){$("body").showLoading();$.ajax({url:url,data:data,dataType:"json",success:function(obj){$("body").hideLoading();}});}


Jquery遮罩ShowLoading組件

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.