Single Choice Easy

QThe generated text for the key events will be present in which two events?

ID: #5168 Javascript DOM & Event Handling MCQ 137 views
Question Info
#5168Q ID
EasyDifficulty
Javascript DOM & Event Handling MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A key and char
  • B char and text
  • C text and key
  • D key and value
Correct Answer

Explanation

When a key event produces printable characters, the resulting text will be the same for both key and char.
When a user presses a key, an event called onkeypress is generated for both keys and characters (on the keyboard).

Share This Question

Challenge a friend or share with your study group.