js_tricks
js_tricks copied to clipboard
浏览器对象 BOM | js tricks
https://qishaoxuan.github.io/js_tricks/bom/
常用的js方法,js_tricks
[获取url中的参数] url.match(/([^?=&]+)(=([^&]*))/g) Uncaught TypeError: Cannot read property 'reduce' of null 参数为空的时候
@justacuser [获取url中的参数] url.match(/([^?=&]+)(=([^&]*))/g) Uncaught TypeError: Cannot read property 'reduce' of null 参数为空的时候
已修复,没有考虑没有的状态...
滚动条回到顶部动画的第5行
window.scrollTo(0, c - c / 8)
此处c
应该是scrollTop
?
另外这个8
应该定义成一个speed
常量?