摘要: /** * 存储localStorage */ export const setStorage = (name, content) => { if (!name) return; if (typeof content !== 'string') { content = JSON.stringify( 阅读全文
posted @ 2020-08-22 15:33 伟笑 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 两种方法: 1、使用正则 function getQueryString(name) { //取url上的id var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.su 阅读全文
posted @ 2020-08-22 15:22 伟笑 阅读(4655) 评论(0) 推荐(0) 编辑