1. <tfoot id='JYADz'></tfoot>

      <small id='JYADz'></small><noframes id='JYADz'>

      <legend id='JYADz'><style id='JYADz'><dir id='JYADz'><q id='JYADz'></q></dir></style></legend>

      <i id='JYADz'><tr id='JYADz'><dt id='JYADz'><q id='JYADz'><span id='JYADz'><b id='JYADz'><form id='JYADz'><ins id='JYADz'></ins><ul id='JYADz'></ul><sub id='JYADz'></sub></form><legend id='JYADz'></legend><bdo id='JYADz'><pre id='JYADz'><center id='JYADz'></center></pre></bdo></b><th id='JYADz'></th></span></q></dt></tr></i><div id='JYADz'><tfoot id='JYADz'></tfoot><dl id='JYADz'><fieldset id='JYADz'></fieldset></dl></div>
      • <bdo id='JYADz'></bdo><ul id='JYADz'></ul>

        无法进行跨域 Ajax 调用

        时间:2023-09-06
          <bdo id='HxIZp'></bdo><ul id='HxIZp'></ul>
            <tfoot id='HxIZp'></tfoot>
              <i id='HxIZp'><tr id='HxIZp'><dt id='HxIZp'><q id='HxIZp'><span id='HxIZp'><b id='HxIZp'><form id='HxIZp'><ins id='HxIZp'></ins><ul id='HxIZp'></ul><sub id='HxIZp'></sub></form><legend id='HxIZp'></legend><bdo id='HxIZp'><pre id='HxIZp'><center id='HxIZp'></center></pre></bdo></b><th id='HxIZp'></th></span></q></dt></tr></i><div id='HxIZp'><tfoot id='HxIZp'></tfoot><dl id='HxIZp'><fieldset id='HxIZp'></fieldset></dl></div>
            • <small id='HxIZp'></small><noframes id='HxIZp'>

                <tbody id='HxIZp'></tbody>
              1. <legend id='HxIZp'><style id='HxIZp'><dir id='HxIZp'><q id='HxIZp'></q></dir></style></legend>
                  本文介绍了无法进行跨域 Ajax 调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  $(document).ready(function(){$.ajax({网址:http://gdata.youtube.com/feeds/api/users/zdf/playlists?v=2",类型:获取",成功:功能(味精){控制台日志(味精);}});});

                  $(document).ready(function(){ $.ajax({ url: "http://gdata.youtube.com/feeds/api/users/zdf/playlists?v=2", type: "GET", success: function(msg){ console.log(msg); } }); });

                  我收到此错误XMLHttpRequest 无法加载 http://gdata.youtube.com/feeds/api/users/zdf/playlists?v=2"

                  i get this error "XMLHttpRequest cannot load http://gdata.youtube.com/feeds/api/users/zdf/playlists?v=2"

                  如何进行跨域 ajax 调用以从 api 获取 xml?

                  How can i make crossdomain ajax calls to get the xml from the api?

                  推荐答案

                  您不能通过跨域调用来获取 XML.接收跨域数据的唯一选择是JSON-P.

                  You cannot make a crossdomain call to to get XML. Your only choice to receive data crossdomain is JSON-P.

                  同源策略限制直接访问外域(ajax/iframes),json-p使用动态脚本标签插入解决此问题.

                  The same origin policy restricts direct access to a foreign domain (ajax/iframes), json-p uses dynamic script tag insertion to workaround this issue.

                  看看 http://api.jquery.com/jQuery.getJSON/.JSON-P 也包含在其中.

                  Have a look at http://api.jquery.com/jQuery.getJSON/. JSON-P is also covered there.

                  编辑

                  http://code.google.com/intl/de-DE/apis/youtube/2.0/developers_guide_json.html

                  为你量身定做!

                  这篇关于无法进行跨域 Ajax 调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Youtube 嵌入式视频开始/停止事件 下一篇:设置 jw player youtube 视频播放质量

                  相关文章

                    <bdo id='RHF72'></bdo><ul id='RHF72'></ul>

                    <legend id='RHF72'><style id='RHF72'><dir id='RHF72'><q id='RHF72'></q></dir></style></legend>
                  1. <i id='RHF72'><tr id='RHF72'><dt id='RHF72'><q id='RHF72'><span id='RHF72'><b id='RHF72'><form id='RHF72'><ins id='RHF72'></ins><ul id='RHF72'></ul><sub id='RHF72'></sub></form><legend id='RHF72'></legend><bdo id='RHF72'><pre id='RHF72'><center id='RHF72'></center></pre></bdo></b><th id='RHF72'></th></span></q></dt></tr></i><div id='RHF72'><tfoot id='RHF72'></tfoot><dl id='RHF72'><fieldset id='RHF72'></fieldset></dl></div>

                    <small id='RHF72'></small><noframes id='RHF72'>

                  2. <tfoot id='RHF72'></tfoot>