dom有个hashchange事件
window.addeventlistener(''hashchange",function(e){
console.log(window.location.hash); //拿到锚点值
//http://www.baidu.com:8080/aaa/1.html/?name=zhangsan#sex
//hostname:www.baidu.com
//host:www.baidu.com:8080
//.port :8080
//.search ?name=张三
//pathname:/aaa/1.html
})
7076

被折叠的 条评论
为什么被折叠?



