1. Home
  2. Computer Science MCQs
  3. Jquery
  4. Which function is used to prevent the default action of an…

Added 30 Jan 2024

Which function is used to prevent the default action of an event in jQuery?

  1. preventDefault() Correct answer
  2. stopPropagation()
  3. haltEvent()
  4. cancelEvent()

Correct answer

A. preventDefault()

17 views

MCQSEXAM

Explanation

The preventDefault() function is used to stop the default action of an event from occurring.

Reference

https://www.w3schools.com/jquery/default.asp

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Jquery MCQs

Practise all Jquery MCQs

Similar MCQs