Function.prototype.bind2 = function(context){
var self = this;
var args = [].slice.call(arguments,1);
var returnfn = function(){
var args2 = [].slice.call(arguments);
return self.apply(this instanceof returnfn ?this:context,args.concat(args2));
}
function returnFather(){}
returnFather.prototype = this.prototype;
returnfn.prototype = new returnFather();
 
return returnfn;
}

 

相关文章:

  • 2022-03-08
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-16
  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
相关资源
相似解决方案