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.
精彩评论