bind兼容处理

if (!Function.prototype.bind) {
    Function.prototype.bind = function(obj) {
        var _self = this
            ,args = arguments;
        return function() {
            _self.apply(obj, Array.prototype.slice.call(args, 1));
        }
    }
}

http://biancheng.dnbcw.info/javascript/463870.html

猜你喜欢

转载自yejian235.iteye.com/blog/2287004