标签:bin prototype color 替换 div ret app object his
function wrap(object,method,wrapper){ //object:包装方法所属对象 method:方法名 wrapper:替换函数 var fn = object[method]; return object[method] = function(){ return wrapper.apply(this,[fn.bind(this)].concat(Array.prototype.slice.call(arguments))); }; }
标签:bin prototype color 替换 div ret app object his
原文地址:http://www.cnblogs.com/halo-yang/p/7819617.html