我正试图教化所收到的个人目标,但obj永远无效,obj.d未定义。 问题在哪里?
JSon response
{"d":"psize=a4&porient=portrait&margintop=10&marginleft=5&marginright=5&marginbottom=10&title=&author=&subject=&keywords=&userpass=&ownerpass=&coverpage=http%3A%2F%2F&conversiondelay=1&allowscript=true"}
The code which call server and receive response above from server
$.ajax({
type: "POST",
url: "Default.aspx/LoadOptions",
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var obj = $.parseJSON(data);
console.log(obj.d);
},
error: ""
});