链接到页面的特定部分 [英] Link to specific part of page
本文介绍了链接到页面的特定部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试了以下所有操作:
I've tried all of the following:
<a name="test"></a>
<a id="test"></a>
<h4 id="test">SOME TEXT</h4>
然后像这样链接到它们:
And then linking to them like this:
<a href="pagename#test">
以上所有方法都可以在Firefox,IE和Chrome上使用,但在Mac上都不能与Safari 5.xx一起使用.非常感谢您的帮助.
All of the above work with Firefox, IE and Chrome, but none of them worked with Safari 5.xx on a mac. Any help is very much appreciated.
推荐答案
<a href="#test">Go to Test</a>
. .
<div id="test">This is Test.</div>
这应该有效.
另外,如果您想链接到其他页面中的特定ID(我认为是这样),请使用:
EDITED: Also, if you want to link to a particular id in a different page, which I think you do, use:
<a href="somepage.html#test">Go to Test on some different page.</a>
这篇关于链接到页面的特定部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文