![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
vapidness_Q
这个作者很懒,什么都没留下…
展开
-
快速获取地址栏数据
export default function (name) { let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); let r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null;}Ï原创 2021-04-20 10:50:33 · 117 阅读 · 0 评论 -
storage事件
使用localStorage中 存储数据时,当存储的数据发生变化时,会触发window 对象的storage事件,通过监听该事件并指定其事件处理函数,可以定义在其他页面中修改localStorage中的值所要执行的处理。 window.addEventListener('storage', event => { console.log(event) });同时打开一个域名下面的多个页面其中一个退出登录跳转登录页,另一个也要求跳转登录页时,可以使此事件监听。此事件不能原创 2021-01-13 10:17:20 · 863 阅读 · 0 评论 -
表格数据的上移和下移
arr[idx1] = arr.splice(idx2,1,arr[idx1])[0]原创 2020-12-27 18:45:45 · 177 阅读 · 0 评论