Home >Web Front-end >JS Tutorial >jquery prevents subsequent events from executing only the first event_jquery
Sometimes you encounter multiple events after clicking on the same label. If you only want to execute the first event and abandon the subsequent events, you can add a piece of code to prevent it:
<span onclick="alert('后面的不会执行了!');event.stopPropagation();">click me!</span>