- 博客(3)
- 收藏
- 关注
原创 去除小数点后面多余的位数
如在页面做加减法的时候,出现很多小数位数0.9999999999999 returnTotal (item) { var r1,r2,m; try{ r1 = item.project_budget_amount.toString().split('.')[1].length; }catch(e){ r1 = 0; } try{ r2=...
2019-09-19 15:31:31 379
原创 函数防抖
避免造成重复请求次数多,服务器瘫痪// 函数防抖var timer = false; document.getElementById("debounce").onscroll = function(){ clearTimeout(timer); // 清除未执行的代码,重置回初始化状态 timer = setTimeout(() => { console.log("函数防抖")...
2019-09-19 15:28:44 103
原创 IOS微信端touchstart事件失效处理
IOS微信端touchstart(长按)事件失效,点击的时候还总是弹出检索条*{ -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; user-selec...
2019-09-19 15:17:18 3313 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人