Analysis of the example of jumping to the address pointed to by href after the click event in html hyperlink
This article mainly shows you the "html hyperlink after the click event to jump to the address of the href example analysis", the content is easy to understand, clear, hope to help you solve the doubt, the following let the editor lead you to study and learn the "html hyperlink after the click event to jump to the address pointed to by href example analysis" this article.
Sometimes we need to use this hyperlink instead of using href to complete the jump, but in this way. In this way, the page will not jump. But at the same time, it will also bring some negative problems, such as the title of the page becomes "#", or the page has a scroll bar. This is because after the execution of the onClick event, you jump to the address pointed to by href, and "#" is an anchor and defaults to the top of the page, so it brings the problems mentioned above.
There are two solutions:
1. Add a return false statement to the onClick event, for example:
Click
2. Replace # with void (0), for example: