HTML anchor not working on page load
When I want to refer to some part of my webpage with anchors : "http://example.com/index.html#section_11" it's not going there.
However, once the page has completely loaded and then I go to address bar, highlight this URL and press enter, it works!
<div class="ui-paddingbox dotted_bg" id="section_11">
some text
</div>
Anchors only go to tag, i think. Try this:
<div class="ui-paddingbox dotted_bg">
<a name="section_11" />
some text
</div>
And make sure that the element won't added after loading (eg with a jquery call)
尝试这个:
<a href="#section_11">link</a>
链接地址: http://www.djcxy.com/p/89012.html
下一篇: HTML定位符在页面加载时不起作用