<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] ## $.ajax 語法 ``` jQuery.ajax( url [, settings ] ) 參數說明: settings 鍵值對組成的對象 accepts 內容類型發送請求頭(Content-Type) async 默認(true),設置為fasle,則為同步請求 beforeSend 請求發送前的回調函數,函數返回 fasle,則取消這個請求 contentType 默認為: 'application/x-www-form-urlencoded; charset=UTF-8' complete 完成請求后調用 context complete回調函數的上下文為這個DOM元素如:"document.body" data 參數對象 dataType xml, json, script, or html error 請求失敗時候調用 global 默認(true),設置為false,則不會觸發全局 AJAX 事件 headers 設置頭對象 jsonp jsonpCallback statusCode 如設置為 statusCode: { 404: function() { alert("page not found"); } 則會觸發此函數 success 成功時調用 timeout 設置超時時間為毫秒 type 默認為GET ``` ### 替換為新的接口 ``` jqXHR.done(function(data, textStatus, jqXHR) {}); // 替換success jqXHR.fail(function(jqXHR, textStatus, errorThrown) {}); // 替換 fail jqXHR.always(function(data|jqXHR, textStatus, jqXHR|errorThrown) { }); // 替換 complete ``` 示例 ``` var jqxhr = $.ajax( "example.php" ) .done(function() { alert("success"); }) .fail(function() { alert("error"); }) .always(function() { alert("complete"); }); // perform other work here ... // Set another completion function for the request above jqxhr.always(function() { alert("second complete"); }); ``` ## 示例 ### post ``` $.ajax({ type: "POST", url: "some.php", data: { name: "John", location: "Boston" } }).done(function( msg ) { alert( "Data Saved: " + msg ); }).fail(function(jqXHR, textStatus) { alert( "Request failed: " + textStatus ); }); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看