Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/454.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquery 1.10.2 getJSON在chrome中不起作用_Javascript_Ajax_Json_Google Chrome_Getjson - Fatal编程技术网

Javascript jquery 1.10.2 getJSON在chrome中不起作用

Javascript jquery 1.10.2 getJSON在chrome中不起作用,javascript,ajax,json,google-chrome,getjson,Javascript,Ajax,Json,Google Chrome,Getjson,代码如下: $.getJSON("http://www.tesy.com/test/2012data.php", function(data) { console.log(data); }); 它适用于safari和firefox,但不适用于chrome 在chrome上,它报告错误并获取失败 为什么? 铬:29.0.1547.65 MacOS:10.8.5你从Chrome中得到了什么?如果您检查url中的原始数据,您会看到什么?只是一个错误,get failed。我检查url中的原始

代码如下:

$.getJSON("http://www.tesy.com/test/2012data.php", function(data) {
    console.log(data);
});
它适用于safari和firefox,但不适用于chrome

在chrome上,它报告错误并获取失败

为什么?

铬:29.0.1547.65
MacOS:10.8.5

你从Chrome中得到了什么?如果您检查url中的原始数据,您会看到什么?只是一个错误,get failed。我检查url中的原始数据,我可以看到json数据。这是实际的url吗?这不是JSON,而是HTML。这不是实际的url。你可以看到对不起,我可以补充的是,它在Chrome30.0Win7上工作