# preventDefault()

*noun*

say it: **“prih-VENT dih-FAWLT”** **/prɪˈvɛnt dɪˈfɔːlt/**

The event method that stops the browser's usual action, such as a form loading a new page.

## What does **preventDefault()** do in JavaScript?

**preventDefault()** — An Event method that cancels the browser's default action when the event is cancelable.

```javascript
form.addEventListener("submit", event => {
    event.preventDefault();
});
```

## In a sentence

- “**preventDefault**() stopped the form reloading the page so fetch could send it.”

Level: Freelancer · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=4)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/preventdefault
