慕容的工作随笔

慕容的工作随笔

记录学习和工作

js 验证是否为json对象

2017-11-21 07:20:13

var isJson = function(obj){
var isjson = typeof(obj) == “object” && Object.prototype.toString.call(obj).toLowerCase() == “[object object]” && !obj.length
return isjson;
}
t = isJson(obj);
alert(t);

评论 (0)

还没有评论,来做第一个吧。

发表评论

提交后需管理员审核通过后显示