摘要: text-decoration:underline; 下划线 text-decoration:overline; 顶划线 text-decoration:line-through; 删除线 阅读全文
posted @ 2020-07-03 16:10 web格调 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 防抖 function debounce(fn,delay){ let timer = null //借助闭包 return function() { if(timer){ clearTimeout(timer) //进入该分支语句,说明当前正在一个计时过程中,并且又触发了相同事件。所以要取消当前的 阅读全文
posted @ 2020-07-03 14:22 web格调 阅读(263) 评论(0) 推荐(0) 编辑
摘要: window.onresize = function(e){ } 阅读全文
posted @ 2020-07-03 14:13 web格调 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1.Array.isArray() 用来判断是否为数组,可以弥补typeof运算符的不足 2.valueOf() 返回数组的原始值(一般情况下其实就是数组自身) 3.toString() 返回数组的字符串形式 4.indexOf() 返回指定元素在数组中第一次出现的位置,没有返回-1 5.lastI 阅读全文
posted @ 2020-07-03 09:35 web格调 阅读(855) 评论(0) 推荐(0) 编辑