转到#div框JavaScript [英] Go to #div box JavaScript
问题描述
维基百科有它..
http://en.wikipedia.org/wiki/USA
内容 ..当你点击你的话。
这不是Javascript,那些是锚链接。请参阅: http://www.w3.org/TR/html401/struct/links .html
基本上,你可以这样链接:
< a href =#FAQ>常见问题< / a>
然后在您要链接的内容上方:
< a name =FAQ/>
或者,您可以使用相同的链接并将FAQ部分标题的ID设置为FAQ ,如下所示:
< h1 id =FAQ>常见问题解答< / h1>
Maybe jQuery, maybe not, but how do i do so like when you click on a link eg. FAQ it goes to the FAQ div box? I mean if its on the bottom then you just click on that link and then it goes to it..
Wikipedia have it.. http://en.wikipedia.org/wiki/USA The links in the "Contents".. when you click you get to it..
That's not Javascript, those are anchor links. See: http://www.w3.org/TR/html401/struct/links.html
Basically, you'd link as such:
<a href="#FAQ">FAQ</a>
Then above the content you're linking to:
<a name="FAQ" />
Alternatively, you could use the same link and set the ID of the FAQ section header to "FAQ", like so:
<h1 id="FAQ">FAQs</h1>
这篇关于转到#div框JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!