How to stop the jump when clicking on an anchor link? [duplicate]
问题 This question already has answers here : Avoid window jump to top when clicking #-links (12 answers) Closed 5 years ago . Is there a way of avoiding the jump when clicking on an anchor link? So that the view does not change. 回答1: The most semantic and meaningful approach to this problem would be to handle the onclick event from within JavaScript. Ideally this file would be best to be stored in a seperate file, however, including a in-line script within your problem file would suffice. Here's