普通版可以实现在1秒内的多个错误提示只显示第一个function debounce(fn, wait) { let timerId = null let flag = true return function () { clearTimeout(timerId) if (flag) { fn.apply(this, arguments) f...
动态运行js代码const s = document.createElement("script"); s.innerHTML = 'alert(123)'; document.body.appendChild(s);动态运行js文件 const s = document.createElement('script'); s.type = 'text/javascr...