开发者

Why are my #links linking to my homepage

I'm working on a page http://www.example.com/control/policies/

I made a link like this: <a href="#">CLICK ME</a>

When I click the link I arrive at http://www.example.com/# rather than http://www.example.com/control/policies/#

This happens for all # links (ie: href="#payments", href="#returns", etc.开发者_StackOverflow社区)

Am I missing something?


You're probably missing the fact that you set a <base href="http://www.example.com/"> somewhere in the <head> of your HTML, which is affecting all relative links, including links to anchors.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜