window.location.hash //获取描点 #jfd
window.location.search; //获取地址栏参数 ?id
let id = window.location.search; //获取地址栏参数
id = id.substring(id.lastIndexOf("=") + 1, id.length); // ?id=1 id=1s
获取浏览器路径信息
最新推荐文章于 2024-05-16 10:31:11 发布