<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    瘋狂

    STANDING ON THE SHOULDERS OF GIANTS
    posts - 481, comments - 486, trackbacks - 0, articles - 1
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    jquery 全局事件

    Posted on 2010-04-16 16:29 瘋狂 閱讀(1971) 評(píng)論(1)  編輯  收藏 所屬分類: jquery

    jquery中各個(gè)事件執(zhí)行順序如下:

    1.ajaxStart(全局事件)

    2.beforeSend

    3.ajaxSend(全局事件)

    4.success

    5.ajaxSuccess(全局事件)

    6.error

    7.ajaxError (全局事件)

    8.complete

    9.ajaxComplete(全局事件)

    10.ajaxStop(全局事件)

           其中,全局事件可以在ajax相關(guān)方法外引用(比如,通過該方式將ajax執(zhí)行各個(gè)階段的信息顯示在頁面某個(gè)地方)。

    下例演示一次ajax請(qǐng)求過程中各個(gè)事件執(zhí)行的順序,以及全局ajax的使用方法view plaincopy to clipboardprint?
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   
                        "http://www.w3.org/TR/html4/loose.dtd">  
    <html>  
    <head>  
      <mce:script src="http://code.jquery.com/jquery-latest.js" mce_src="http://code.jquery.com/jquery-latest.js"></mce:script>  
        
      <mce:script type="text/javascript"><!--  
      $(function(){  
        //點(diǎn)擊按鈕,并執(zhí)行ajax請(qǐng)求  
        $("#ajaxReuqestID").click(function(){  
                $.ajax({  
                       url: "http://blog.csdn.net/gaoyusi4964238",  
                       beforeSend:function(){  
                        $("#ajaxStateID").text("berforeSend");  
                         alert("berforeSend");  
                      },  
                       success: function(){  
                        $("#ajaxStateID").text("success");  
                        alert("success");     
                      },  
                      error:function(){  
                        $("#ajaxStateID").text("error");  
                        alert("error");  
                      },  
                      complete:function(){  
                        $("#ajaxStateID").text("complete");  
                        alert("complete");  
                      }  
                     });  
            });  
              
            $("#ajaxStateID").ajaxStart(function(){  
                $(this).text("ajaxStart");  
                alert("ajaxStart");  
            }).ajaxSend(function(){  
                $(this).text("ajaxSend");  
                alert("ajaxSend");  
            }).ajaxSuccess(function(){  
                $(this).text("ajaxSuccess");  
                alert("ajaxSuccess");  
            }).ajaxError(function(){  
                $(this).text("ajaxError");  
                alert("ajaxError");  
            }).ajaxComplete(function(){  
                $(this).text("ajaxComplete");  
                alert("ajaxComplete");  
            }).ajaxStop(function(){  
                $(this).text("ajaxStop");  
                alert("ajaxStop");  
            });  
        })  
        
    // --></mce:script>  
       
    </head>  
    <body>  
        <input type="button" value="點(diǎn)擊觸發(fā)ajax請(qǐng)求" id="ajaxReuqestID"/>  
      <div id="ajaxStateID"></div>  
    </body>  
    </html> 


    本文來自CSDN博客,:http://blog.csdn.net/gaoyusi4964238/archive/2009/08/13/4443401.aspx


    評(píng)論

    # re: jquery 全局事件  回復(fù)  更多評(píng)論   

    2013-01-25 15:06 by 發(fā)的地方
    松島楓松島楓

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 巨胸喷奶水视频www网免费| 天天综合亚洲色在线精品| 日韩免费视频一区二区| 亚洲日韩v无码中文字幕| 久久国产精品免费一区| 久久久久亚洲爆乳少妇无| 一级特黄录像视频免费| 亚洲人成伊人成综合网久久久 | 亚洲Aⅴ无码专区在线观看q | 亚洲免费视频播放| 亚洲AV无码久久久久网站蜜桃 | 国产精品免费久久久久影院| 亚洲女初尝黑人巨高清| 久久久久久久99精品免费| 91情国产l精品国产亚洲区| 无码乱肉视频免费大全合集| 亚洲欧美成人一区二区三区| 波多野结衣中文一区二区免费| 青青免费在线视频| 久久精品亚洲综合一品| 又黄又爽又成人免费视频| 亚洲精品国产av成拍色拍| 亚洲中文无韩国r级电影| 污污网站18禁在线永久免费观看| 亚洲性无码av在线| 国产美女无遮挡免费网站| 大妹子影视剧在线观看全集免费| 亚洲人成依人成综合网| 女人18毛片水真多免费看| 一个人免费观看视频在线中文 | 亚洲精品久久久www| 成人免费区一区二区三区| 亚洲一级毛片免费观看| 一区国严二区亚洲三区| 麻豆精品不卡国产免费看| 亚洲区日韩精品中文字幕| 亚洲综合在线另类色区奇米| 日本三级2019在线观看免费| 一级毛片a免费播放王色电影 | 豆国产96在线|亚洲| 亚洲av无码无在线观看红杏|