开发者

Simple named anchor doesn't work in FF but it does in IE

I have a href link:

/agenda/#Testevent

Which in IE it goes to the corresponding <h4> element but in Firefox it doesn't work.

I have used this named anchor:

<h4 nam开发者_如何转开发e="#Testevent" id="#Testevent">

Any suggestions?


Drop the '#'

name="Testevent"


You can either do this:

<h4><a name="Testevent">Title</a></h4>

Or else you can also do this:

<h4 id="Testevent">Title</h4>

"Destination anchors in HTML documents may be specified either by the A element (naming it with the name attribute), or by any other element (naming with the id attribute)."

Source: w3.org: Links in HTML documents

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜