You are developing a customer web form that includes the following HTML. <input id = "txtValue" />
A customer must enter a value in the text box prior to submitting the form.
You need to add validation to the text box control.
Which HTML should you use?
A. <input id="txtValue" type="text" required="required"/>
B. <input id="txtValue" type="text" pattern="[A-Za-z]{3}" />
C. <input id="txtValue" type="required" />
D. <input id="txtValue" type="required" autocomplete="on" />
Answer: A
You are developing a customer contact form that will be displayed on a page of a company's website.
The page collects information about the customer.
If a customer enters a value before submitting the form, it must be a valid email address.
You need to ensure that the data validation requirement is met.
What should you use?
B. <input name="email" type="text" required="required"/>
C. <input name="email" type="text"/>
D. <input name="email" type="email"/>
No comments:
Post a Comment
Note: only a member of this blog may post a comment.