摘要: 1、https://www.cnblogs.com/giggle/p/5346531.html2、奇怪的setTimeoutfunction test(){ console.log(1); setTimeout(function(){ conso... 阅读全文
posted @ 2018-04-02 17:35 smartwange 阅读(21) 评论(0) 推荐(0)
摘要: 1、for循环中使用闭包避免总是输出最后一个值var btn=document.getElementsByTagName('button'); for (var i=0;i<btn.length;i++) { btn[i].addEventListene... 阅读全文
posted @ 2018-04-02 16:45 smartwange 阅读(15) 评论(0) 推荐(0)