var data = {"code":0,"msg":"success"};
if (typeof data == 'string') {
try {
var obj=JSON.parse(data);
if(typeof obj == 'object' && obj ){
alert("格式正确");
}else{
alert("格式不正确");
}
} catch(e) {
alert("格式不正确");
}
}
文末小福利免费视频资源网站:www.sousuohou.com