<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ### 返回值:undefinedjQuery.ajaxPrefilter( [dataTypes] , handler(options, originalOptions, jqXHR) ) ### 概述 Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). 參數見 '$.ajax' 說明。 ### 參數 #### **[dataTypes]***V1.5* An optional string containing one or more space-separated dataTypes #### ** handler(options, originalOptions, jqXHR)***V1.5* A handler to set default values for future Ajax requests. ### 示例 #### 描述: A typical prefilter registration using?$.ajaxPrefilter()?looks like this: ~~~ $.ajaxPrefilter( function( options, originalOptions, jqXHR ) { // Modify options, control originalOptions, store jqXHR, etc }); ~~~ ##### where: - *options*?are the request options - *ooriginalOptions*?are the options as provided to the ajax method, unmodified and, thus, without defaults from?*ajaxSettings* - *ojqXHR*?is the jqXHR object of the request #### 描述: Prefilters are a perfect fit when custom options need to be handled. Given the following code, for example, a call to?$.ajax()?would automatically abort a request to the same URL if the custom?abortOnRetry?option is set to?true: ~~~ var currentRequests = {}; $.ajaxPrefilter(function( options, originalOptions, jqXHR ) { if ( options.abortOnRetry ) { if ( currentRequests[ options.url ] ) { currentRequests[ options.url ].abort(); } currentRequests[ options.url ] = jqXHR; } }); ~~~ #### 描述: Prefilters can also be used to modify existing options. For example, the following proxies cross-domain requests through http://mydomain.net/proxy/: ~~~ $.ajaxPrefilter( function( options ) { if ( options.crossDomain ) { options.url = "http://mydomain.net/proxy/" + encodeURIComponent( options.url ); options.crossDomain = false; } }); ~~~ #### 描述: If the optional?dataTypes?argument is supplied, the prefilter will be only be applied to requests with the indicated dataTypes. For example, the following only applies the given prefilter to JSON and script requests: ~~~ $.ajaxPrefilter( "json script", function( options, originalOptions, jqXHR ) { // Modify options, control originalOptions, store jqXHR, etc }); ~~~ #### 描述: The?$.ajaxPrefilter()?method can also redirect a request to another dataType by returning that dataType. For example, the following sets a request as "script" if the URL has some specific properties defined in a custom?isActuallyScript()?function: ~~~ $.ajaxPrefilter(function( options ) { if ( isActuallyScript( options.url ) ) { return "script"; } }); ~~~ This would ensure not only that the request is considered "script" but also that all the prefilters specifically attached to the script dataType would be applied to it.
                  <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>

                              哎呀哎呀视频在线观看