PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are developing a customer web form that includes the following HTML.
<input id=”txtValue” type=”text” />
A customer must enter a valid agein the text box prior to submitting the form.
You need to add validation to the control. Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.

B.

C.

D.

Explanation:
.val()
Get the current value of the first element in the set of matched elements or set the value of every matched
element.
.text()
Get the combined text contents of each element in the set of matched elements, including their descendants, or
set the text contents of the matched elements.
RegExexplained


Leave a Reply