js如何判断对象是否为空
摘要:1.将json对象转化为json字符串,再判断该字符串是否为"{}" var data = {}; var b = (JSON.stringify(data) == "{}"); alert(b);//true 2.for in 循环判断 var obj = {}; var b = function
阅读全文
posted @ 2018-10-30 14:42
posted @ 2018-10-30 14:42
posted @ 2018-10-24 17:14
posted @ 2018-10-22 17:37