Skip to content

Glossary: JavaScript in the Browser

preventDefault

Also written: event.preventDefault()

A method on the event object that cancels the browser's default action, such as stopping a form submit from reloading the page.

Where the book teaches it

Related terms

Default actionEvent object