方法一:
var a={}; console.log(Object.keys(a).length==0); // true
方法二:
var a={}; console.log(JSON.tringify(a)=='{}'); // true