js的绑定函数

Function.prototype.bindFunc = function (b) {
if (typeof (b) != "object") {
return false
}
var a = this;
return function () {
return a.apply(b, arguments)
}
};

原文地址:https://www.cnblogs.com/yanypan/p/2776737.html