function isNullObj(obj) {
for (var i in obj) { if (obj.hasOwnProperty(i)) { return false; } } return true;}
注:可以判断obj = new Object() 和 obj = {} 两种形式。