摘要:
点我绑定事件 阅读全文
摘要:
Function.prototype.bind = function(){ var self = this, // 保存原函数 context = [].shift.call( arguments ), // 需要绑定的 this 上下文 args = [].slice.call( arguments ); // 剩余的参数转成数组 return function(){ // ... 阅读全文
摘要:
let reg =/([^?&+#]+)=([^?&+#]+)/g; let obj={}; let href = 'http://www.runoob.com/jquery/misc-trim.html?channelid=12333&name=xiaoming&age=23'; href.replace(reg,($0,$1,$2)=>obj[$1]=$2) console.log(obj)... 阅读全文