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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] # 1.跨域 ![](https://box.kancloud.cn/425196de01f6ced463709db5be09193e_721x220.png) 當協議,子域名,主域名,端口號,任意一個不同時,就算作不同的域。 * 不同域之間請求資源就算做跨域。 * Javascript出于安全性的考慮,不允許跨域調用其他頁面的對象。簡單理解就是因為Javascript同源策略的限制,a.com域名下的js無法操作b.com域名下的對象。 ![](https://box.kancloud.cn/a0b601fae1ed7f6146de531fab608d34_688x236.png) # 2.如何解決跨域 ## 2.1.jsonp ``` $.ajax({ type:"method", url:"", dataType:"jsonp", jsonp:"callback", success:function(data){ }, error:function(xhr){ console.log(xhr.status) } }) ``` ## 2.2.服務器的解決方案 ![](https://box.kancloud.cn/c93345b131a9e3baf9129b22bdd62f38_679x264.png) ## 2.3.js中script標簽不受同源策略的影響也可以實現跨越 ``` var script = document.createElement("script"); script.src = "http://api.douban.com/v2/movie/subject/1764796?&callback=handleResponse"; document.body.prepend(script); function handleResponse(res) { // 對response數據進行操作代碼 console.log(res) } ```
                  <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>

                              哎呀哎呀视频在线观看