js设置页面锚点

var hash; 
hash=(!window.location.hash)?"#tab_1":window.location.hash; 
window.location.hash=hash;

 

posted @ 2018-06-05 15:57  花兮  阅读(443)  评论(0编辑  收藏  举报