This is my URL:
www.example.com/contact#test
Now I need to test
. According to the research, I've found a site related to my problem, and I realized that I should use of hash
for get test
from my url. something like this:
var url = www.example.com/contact#test;
var anchor = url.hash;
alert(anchor);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…