Explain the use of the event.preventDefault() method.
The event.preventDefault() method is used to prevent the default action of an event from occurring.
The event.preventDefault() method is used to prevent the default action of an event from occurring.