js常用的封装方法

1.判断是否为空对象 

返回 false 不为空,true 为空

function isEmptyObject(obj) {
    var t;
    for (t in obj) {
      return !1;
    }
    return !0;
}

  

posted @ 2018-11-13 14:54  无力的地球  阅读(289)  评论(0编辑  收藏  举报