if(typeof(obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length){
alert('是JSON对象');
}
判断一个对象是否是JSON对象
最新推荐文章于 2023-07-29 08:46:17 发布
if(typeof(obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length){
alert('是JSON对象');
}