更新时间:2022-05-08 22:18:09
$.getJSON只是以下简称:
$.getJSON is just shorthand for:
$.ajax({
dataType: "json",
url: url,
data: data,
success: success
});
在此处查看文档: http://api.jquery.com/jQuery.getJSON/
只需使用$ .ajax将dataType更改为"html",然后使用$ .parseJSON解析成功函数中的修改后的JSON数据
Just use $.ajax change dataType to "html" and parse your modified JSON data in the success function with $.parseJSON
注意:由于您似乎正在执行跨域请求,因此必须使用jsonp,请在此处阅读更多信息:
Note: Since it seems you are doing a cross-domain request, you must use jsonp, read more here: