Microsoft
98-375 · Question #37
You are developing a customer web form that includes the following HTML input field. <input id="txtValue"/> If a customer enters a value in the input field, then it must be a numeric value. You need…
The correct answer is B. <input id="txtValue" type="number" />. See the full explanation below for the reasoning.
Question
You are developing a customer web form that includes the following HTML input field. <input id="txtValue"/> If a customer enters a value in the input field, then it must be a numeric value. You need to add validation to the input field. Which HTML should you use?
Options
- A<input id="txtValue" type-"text" pattern="/#" />
- B<input id="txtValue" type="number" />
- C<input id="txtVa!ue" type="integer" />
- D<input id="txtValue" type="text" required="required"/>
How the community answered
(39 responses)- A5% (2)
- B85% (33)
- C3% (1)
- D8% (3)
Community Discussion
No community discussion yet for this question.