How to realize the function of page jump by html
This article mainly explains the "html how to achieve page jump function", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "html how to achieve page jump function" bar!
The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.
The method of how to realize Page Jump in html
1. Use the default link anchor
The easiest way is to add a hyperlink and set the href property of the hyperlink to "# top" to return to the top.
Hyperlink
2. Href points to a specific ID
Among the existing tags on the page, use the href of the "return to the top" connection to point to the tag with the id attribute at the top to achieve the function of returning to the top. This approach requires a tag with the id attribute in the tag at the top of the page to point to the top. You can also customize the addition.
... Hyperlink
3. Use custom link anchors
This method is to use the custom link anchor, you must define the anchor, and then use the hyperlink to point to the anchor.
This method is actually similar to the second method, except that an additional link anchor must be defined.
/ / define a hyperlink, jump to this, there can be no text. Hyperlink
4. Use simple functions
You can set the values of x and y in scrollTo (0Pol 0) to jump to the specific location of the page.