0

我尝试使用此代码加载 youtube 视频脚本文件

var rqst=$.ajax( {
    dataType : 'jsonp', 
    type : 'GET', 
    url : 'https://www.youtube.com/api/timedtext?v=bwOhfoewMYs&lang=en&callback=alert', 

   success : function(response) {
alert("SUCCESS");
             }, 
   error : function() {
       alert("failed."); }
   }
);

并出现此错误

Uncaught SyntaxError: Unexpected token < 

并且未分配变量rqst,因此我无法访问文件的 RespondText 屏幕截图:
错误

4

1 回答 1

0

您正在尝试将 XML 文件作为 JSONP 读取。
那是完全不可能的。

于 2012-07-27T14:42:12.290 回答