PrepAway - Latest Free Exam Questions & Answers

You are developing a customer web form that includes the following HTML.

You are developing a customer web form that includes the following HTML.

<

label id=-txtValue-X/label

>

Information from the web form is submitted to a web service. The web service returns the following JSON object.

{

-Confirmation-: -1234-,

-FirstName-: -John-

}

You need to display the Confirmation number from the JSON response in the txtValue label field.

Which JavaScript code segment should you use?

A. $(-#txtValue-).val = (JSONObject.Confirmation);

B. $(-#txtValue-).val (JSONObject.Confirmation);

C. $(-#txtValue-).text = (JSONObject.Confirmation);

D. $(-#txtValue-).text(JSONObject.Confirmation);

Explanation:

Reference:

http://api.jquery.com/text/


Leave a Reply

PrepAway - Latest Free Exam Questions & Answers

You are developing a customer web form that includes the following HTML.

You are developing a customer web form that includes the following HTML.

<

input id=-txtValue-/

>

You need to change the HTML markup so that customers can enter only a valid three-letter country code.

Which HTML should you use?

A.

<

input id=-txtValue- type=-country-/

>

B.

<

input id=-txtValue- type=-text- required=-xxx-/

>

C.

<

input id=-txtVa!ue- type=-text- pattern– [A-Za-z] {3} -/

>

D.

<

input id=-txtValuen type=-code- pattern-=-country-/

>

Explanation:

HTML

<

input

>

pattern Attribute

The pattern attribute specifiesa regular expression that the

<

input

>

elements value is checked against.

Example

An HTML form with an input field that can contain only three letters (no numbers or special characters):

<

form action=-demo_form.asp-

>

Country code:

<

input type=-text- name=-country_code-

pattern=-[A-Za-z]{3}- title=-Three letter country code-/

>

<

input type=-submit-

>

<

/form

>

Reference: HTML

<

input

>

pattern Attribute

http://www.w3schools.com/tags/att_input_pattern.asp


Leave a Reply