javascript
ploter
背上梁山
展开
-
防抖(debounce)节流(throttle)javascript实现
function debounce(func, wait) { let timeout; return function() { const args = arguments; let later = () => { timeout = 0; func.apply(this, args); }; if (timeout) { clearTimeou.原创 2021-07-26 15:09:17 · 51 阅读 · 0 评论 -
js获取url参数
//https://www.baidu.com/s?wd=csdn&rsv_spt=1&rsv_iqid=0x93d2642e00010750var currentURL = new URL(window.location.href);currentURL.searchParams.get('rsv_iqid');原创 2021-06-09 13:33:46 · 76 阅读 · 0 评论 -
如何隐藏html伪元素,比如:after :before
var style = document.createElement('style');style.innerHTML = "body:after{display:none} body:before{display:none}";document.head.appendChild(style);原创 2021-06-04 15:49:46 · 1964 阅读 · 0 评论