摘要: 点我绑定事件 阅读全文
posted @ 2018-12-04 21:33 炒份黄瓜 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Function.prototype.bind = function(){ var self = this, // 保存原函数 context = [].shift.call( arguments ), // 需要绑定的 this 上下文 args = [].slice.call( arguments ); // 剩余的参数转成数组 return function(){ // ... 阅读全文
posted @ 2018-12-04 21:15 炒份黄瓜 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 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)... 阅读全文
posted @ 2018-12-04 11:28 炒份黄瓜 阅读(457) 评论(0) 推荐(0) 编辑