尝试从 json 响应中获取值时,我一直未定义:
//错误
{"NewDataSet":{"Table1":{"AUTONUM":"120"}}}
//代码
function DisplayAdvisorDetail() {
$.ajax({
type: "POST",
url: "url",
data: "{'ZipCode':'48038'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
var adv = response.d;
$("#QuickenName").html(adv.AUTONUM);
alert(adv.AUTONUM);
},
failure: function (msg) {
alert(msg);
}
});
}