You have a webpage that includes the following markup:
Correct Answer: A
You are developing a customer web form that includes the following HTML.
<input id=”txtValue” type=”text” />
A customer must enter a valid age in the text box prior to submitting the form.
You need to add validation to the control.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
A string containing the value of the element, or an array of strings if the element can have multiple values
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?
A. <input name=”email” type=”url”/>
B. <input name=”email” type=”text” required=”required”/>
C. <<input name=”email” type=”text”/>
D. <input name=”email” type=”email”/>
Correct Answer: D
The <input type=”email”> is used for input fields that should contain an e-mail address.
Depending on browser support, the e-mail address can be automatically validated when submitted.
Some smartphones recognize the email type, and adds “.com” to the keyboard to match email input.
<input type=”email” name=”email”/>
You are developing a form that captures a user’s email address by using HTML5 and jQuery.
The form must capture the email address and return it as a query string parameter. The query string parameter must display the @ symbol that is used
in the email address.
You need to implement this functionality.
How should you develop the form? (To answer, drag the appropriate code segment to the correct target or targets in the answer area. Each code
segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:
* The serialize() method creates a URL encoded text string by serializing form values.
You can select one or more form elements (like input and/or text area),or the form element itself.
The serialized values can be used in the URL query string when making an AJAX request.
The decodeURIComponent() function decodes a URI component.
Return Value:A String,representing the decoded URI
Reference: jQuery serialize() Method
You are developing an application that consumes a Windows Communication Foundation (WCF) service.
The application interacts with the service by using the following code. (Line numbers are included for reference only.)
You need to authenticate to the WCF service.
What should you do?
A. At line 11, add the following lines of code.
B. At line 11, add the following line of code.
C. At line 06, replace the code with the following line of code.
D. At line 11, add the following line of code. The username and password will be stored in an XML file.
Correct Answer: C