私人领地

js获取锚点名称 #

var thisId = window.location.hash;
alert(thisId);

输出

#2

posted @ 2015-07-04 19:02  狂奔的蜗牛Snails  阅读(1256)  评论(0编辑  收藏  举报