js 闭包

 

// 判断类型
function isType(type) {
    return function(obj) {
        return Object.prototype.toString.call(obj) === '[object ' + type + ']';
    }
}

 

posted @ 2014-08-25 17:39  qingyezhu  阅读(109)  评论(0)    收藏  举报