判断普通javascript对象是否为空(含有可枚举的属性,自有的.继承的都可以),可使用jQuery 3.2.1版的isEmptyObject()方法: isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; } As of jQuery 1.4 this method checks both properties on the object itself and