Microsoft
98-375 · Question #38
You develop an HTML5 webpage. You have the following HTML markup: <input type="text" id="username" /> You need to prevent users from entering specific characters into the username field. What should…
The correct answer is B. Using the change event, add an anonymous function that returns true when a specific. See the full explanation below for the reasoning.
Question
You develop an HTML5 webpage. You have the following HTML markup:
<input type="text" id="username" /> You need to prevent users from entering specific characters into the username field. What should you do?
Options
- AUsing the keyup event, add an anonymous function that returns true when a specific
- BUsing the change event, add an anonymous function that returns true when a specific
- CUsing the keydown event, add an anonymous function that returns false when a specific
- DUsing the change event, add an anonymous function that returns false when a specific
How the community answered
(35 responses)- A6% (2)
- B83% (29)
- C3% (1)
- D9% (3)
Community Discussion
No community discussion yet for this question.