Open In App

jQuery event.preventDefault() Method

Last Updated : 11 Jul, 2025
Comments
Improve
Suggest changes
1 Like
Like
Report

The jQuery preventDefault() Method is used to stop the default action of the selected element to occur. It is also used to check whether preventDefault() method is called for the selected element or not. 

Syntax:

event.preventDefault()

Parameter: It does not accept any parameter. 

Example 1: This example uses preventDefault() method to stop to open the new link. 

Output: 

Example 2: This example uses event.preventDefault() method to stop submitting the form. 

Output: 


Similar Reads