Answer:
The event.preventDefault() method stops the default action of an element from happening. For example, Prevents a link from following the URL.
Previous Question | Next Question |
Can you please explain the difference between prop and attr? | What is event.stopPropagation? |