亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jQuery簡單實現(xiàn)提交數(shù)據(jù)出現(xiàn)loading進度條的方法

 更新時間:2016年03月29日 09:41:25   作者:藍色雨敏  
這篇文章主要介紹了jQuery簡單實現(xiàn)提交數(shù)據(jù)出現(xiàn)loading進度條的方法,涉及jQuery的ajax調(diào)用及頁面樣式操作技巧,需要的朋友可以參考下

本文實例講述了jQuery簡單實現(xiàn)提交數(shù)據(jù)出現(xiàn)loading進度條的方法。分享給大家供大家參考,具體如下:

html部分代碼如下,復制然后引入類庫即可使用

<html>
<head>
<style type="text/css">
 #bg{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.2; opacity:.2; filter: alpha(opacity=70);}
 .loading{display: none; position: absolute; top: 50%; left: 50%; z-index:1002; }
 </style>
</head>
<body>
  <div id="bg"></div>
  <input type="button" value="Save" id="btnSave" name="btnSave" />
  <div class="loading"><img src="loading.gif"></div>
</body>
</html>

jQuery部分代碼如下:

<script src="jquery-1.11.0.min.js" type="text/javascript"></script><!--自己下載類庫-->
<script type="text/javascript">
$(function(){
  $("#btnSave").click(function(){
    $("#bg,.loading").show();
    $.ajax({
      async:false,
      url:"time.php",
      type:"post",
      data:{},
      success:function(mes){
        $("#bg,.loading").show();
      }
    })
  })
})
</script>

php代碼:

for($i=0;$i<10000000;$i++){
}

更多關于jQuery相關內(nèi)容感興趣的讀者可查看本站專題:《jQuery切換特效與技巧總結(jié)》、《jQuery拖拽特效與技巧總結(jié)》、《jQuery擴展技巧總結(jié)》、《jQuery常見經(jīng)典特效匯總》、《jQuery動畫與特效用法總結(jié)》、《jquery選擇器用法總結(jié)》及《jQuery常用插件及用法總結(jié)

希望本文所述對大家jQuery程序設計有所幫助。

相關文章

最新評論