PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are developing a customer web form that includes following HTML.
<input id= “textAccountType”/>
You need to develop the form so that customers can enter only a valid account type
consisting of two English alphabet characters.
Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

10 Comments on “Which code segment should you use?

  1. brkyctn says:

    Explanation/Reference:
    * The val() method returns or sets the value attribute of the selected elements.
    * HTML pattern Attribute
    The pattern attribute specifies a regular expression that the element’s value is checked against.
    Example
    An HTML form with an input field that can contain only three letters (no numbers or special characters):

    Country code:

    Reference: HTML pattern Attribute
    http://www.w3schools.com/tags/att_input_pattern.asp




    0



    0

Leave a Reply