如果直接用json.id 会提示找不到。
$.ajax(
{
type : "post",
url : "{:U('Home/dan/getdata')}",
success : function (json)
{
console.log(JSON.parse(json).id);
}
},'json');
用
JSON.parse(json).id
就可以了
微信扫一扫
如果直接用json.id 会提示找不到。
$.ajax(
{
type : "post",
url : "{:U('Home/dan/getdata')}",
success : function (json)
{
console.log(JSON.parse(json).id);
}
},'json');
用
JSON.parse(json).id
就可以了
相关推荐