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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 1、代理方式實現跨域請求 ![](https://img.kancloud.cn/67/9d/679dfb6400f8d2ad82ac412845a080a4_563x171.png) 發送Ajax請求的時候,請求本網站的php文件,讓本網站的php文件去請求另外網站的內容。 Ajax網站:09daili.html ![](https://img.kancloud.cn/fd/57/fd5725f7738342b71705676368acb32f_603x208.png) Ajax網站:09daili.php ![](https://img.kancloud.cn/d6/5e/d65e6bf4b90f815c74985eca7d036203_641x136.png) JS網站:09daili.php ![](https://img.kancloud.cn/2b/fe/2bfea6c112e983cc5b77e7ea7ceea114_561x87.png) # 2、CORS方式實現跨域請求 需要在被請求的網頁中設置:Access-Control-Allow-Origin。 IE9+支持。 如使用Ajax網站的文件去請求JS網站的文件內容,需要在JS網站中設置CORS頭。 Ajax網站:10cors.html ![](https://img.kancloud.cn/10/e6/10e61c815b728af91350b2432bac1f28_790x193.png) JS網站:10cors.php ![](https://img.kancloud.cn/6a/14/6a14c360812dcb4b3dc172783dd35242_973x487.png) # 3、使用JSONP技術實現跨域請求 Jsonp(JSON with Padding) 是 json 的一種"使用模式",通俗的講,jsonp可以通過html標簽中的src屬性可以訪問另外域的內容,可以讓網頁從別的域名(網站)那獲取資料,即跨域讀取數據。 # 4、小練習--跨域請求天氣信息 接口地址:http://www.weather.com.cn/data/sk/101010100.html
                  <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>

                              哎呀哎呀视频在线观看