Home > Article > Web Front-end > Discussion on the execution order of a tag click and href_javascript skills
Premise: The project starts to bind the document click event, and an a tag of the document subclass is also bound to the click time. To achieve the effect, the document event does not trigger after the click event is triggered. That is, organizing event bubbling and adding methods to prevent event bubbling (e.stopPropagation(); e.preventDefault();) will not work. This only happens under Google now, and ff will not happen.
Reason: The href="#" of the hyperlink is triggered later than the click,
Solution: Add return false;