Prevent a link from opening the URL:
The event.preventDefault() method stops the default action of an element from happening.
Tip: Use the event.isDefaultPrevented() method to check whether the preventDefault() method was called for the event.
|event||Required. The event parameter comes from the event binding function|
Your message has been sent to W3Schools.