[ACCEPTED]-Go to #div box JavaScript-anchor
Accepted answer
That's not Javascript, those are anchor 5 links. See: http://www.w3.org/TR/html401/struct/links.html
Basically, you'd link as such:
<a href="#FAQ">FAQ</a>
Then 4 above the content you're linking to:
<a name="FAQ" />
Alternatively, you 3 could use the same link and set the ID of 2 the FAQ section header to "FAQ", like 1 so:
<h1 id="FAQ">FAQs</h1>
First, add an id to the HTML element. This 4 will serve as the anchor.
For example:
id="mybox"
Now 3 simply add a link to #mybox on that page. E.g. example.com/index.html#mybox
<a href="#mybox">Box</a>
As 2 mentioned these are not anything to do with 1 javascript; it is not required for this.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.