result = "{"msg":"修改成功!","obj":null,"success":true}" 如何取到 msg的值
alert(result ); 若是字符串应当先转化为obj;
字符串: {"status":1,"msg":"success"}
方法一:var obj = eval('(' + result + ')');
方法二:var obj = JSON.parse(result ); //由JSON字符串转换为JSON对象[/b]
方法三:var obj = result .parseJSON(); //由JSON字符串转换为JSON对象
if(obj .status == 1){
alert('yes');
}
json: [object Object]
if(result .status == 1){
alert('yes');
}