one
123456Function .prototype.bindSelf= function(context){var that = this;return function(){that.apply(context)}}Two
123456789Function . prototype . bind2 = function(context){var that = this;//获取参数var args = Array.prototype.slice.call(arguments,1);return function(){var bindArgs = Array.prototype.slice.call(arguments)that .apply(context,args.concat(bindArgs))}}Three
123456789101112Function.prototype.bind = function(context){var that = this;var args = Array.prototype.slice.call(arguments,1);var Fun = function(){}var Func = function(){var bindArgs = Array.prototype.slice.call(arguments);that.apply(this instanceof that ? this : context,bindArgs)}Fun.prototype = this.prototype;Func.prototype = new Fun();return Func;}