我正在使用jQuery来获取一些JSON数据。我将它存储在一个名为“ajaxResponse”的变量中。我不能从中取出数据点;我没有定义ajaxResponse.blah。 typeof是一个字符串。认为它应该是一个对象。无法使用jQuery查询JSON
var getData = function (url) {
var ajaxResponse = "";
$.ajax({
url: url,
type: "post",
async: false,
success: function (data) {
ajaxResponse = data;
}
});
return ajaxResponse;
},
...
typeof ajaxResponse; // string
ajaxResponse.blah[0].name // ajaxResponse.blah is not defined
aw man!谢谢:)我的坏,不知道去哪里 – alan 2009-12-12 18:18:49
这种类型是如何发布?那会得到什么?感谢名单 – 2011-03-27 20:29:52