Question 1
Which type value for the input element triggers validation in modern browsers?Correct Answer:
c. Question 2
Enhancements to HTML and to modern browsers have allowed browsers themselves to perform many validation tasks without any extra JavaScript. This type of validation is known as __________ validation.Correct Answer: Evaluation Method Correct Answer Case Sensitivity
Exact Matchbrowser-based
Exact Matchbrowser based
Exact Matchnative
Exact MatchHTML5
Exact MatchHTML 5 Question 3
In modern browsers, which attribute of an input element prevents the form from being submitted if the field is left blank?Correct Answer:
a. Question 4
To check a group of fields and trigger an error message if any of them is empty, you use a(n) ____ statement.Correct Answer:
a. Question 5
Validation errors found by modern browsers are reported in ____.Correct Answer:
d. Question 6
For any fields that require numeric values, you can use JavaScript’s built-in ____ function to determine whether a user actually entered a number.Correct Answer:
a. Question 7
Creating a function to validate required fields generally involves retrieving the values of the required fields and checking if the value of any of them is __________.Correct Answer: Evaluation Method Correct Answer Case Sensitivity
Exact Matchan empty string
Exact Matchempty string
Exact Matchempty
Exact Match"" Question 8
You use the ____ method on an object to block the action normally associated with an event.Correct Answer:
d. Question 9
Instead of document.getElementsByTagName("form")[0], you could use the codeCorrect Answer:
d. Question 10
By default, browsers create an collection of form objects that you can reference using array notation.Correct Answer:
TrueQuestion 11
Many aspects of the way browsers present browser-based validation feedback are customizable through the properties and methods of the ____.Correct Answer:
a. Question 12
To display no default value on a selection list, you set its ____ property to -1.Correct Answer:
a. Question 13
What element property would you use when copying the contents of one text field to another text field?Correct Answer:
b. Question 14
For all custom validation, it can be helpful to use the __________ structure for handling errors.Correct Answer: Evaluation Method Correct Answer Case Sensitivity
Exact Matchtry/catch
Exact Matchtry catch Question 15
Use of the ____ attribute of the form element is not allowed in the strict DTD for XHTML.Correct Answer:
b. Question 16
Which attribute enhances usability in modern browsers?Correct Answer:
c. Question 17
Assistive functions perform a type of validation.Correct Answer:
FalseQuestion 18
In general, modern browsers display validation feedback after the ____ event is triggered by a form.Correct Answer:
b. Question 19
You can use HTML to set the default value of a selection list so no option is selected.Correct Answer:
FalseQuestion 20
While JavaScript lets you perform validation in a user’s browser, the server-side programs that receive form data generally perform validation as well.Correct Answer:
TrueQuestion 21
Match each item with a statement below:Question Correct Match Displays a validation error in a modern browser
a. bubbleReduce the likelihood of user errors when completing a form
h. assistive functionsEnables customization of validation feedback in modern browsers
c. constraint validation APIPersistence required for a user to accomplish a goal
j. frictionDetermines whether a value is not a number
d. isNaN() functionChecking that information provided by users conforms to rules
b. validationProvides guidance about what data should be entered in a text box
e. placeholderIf all its properties are false, then its value is true
g. validity objectStops a form from being submitted when the submit event is triggered
i. preventDefault()Indicates that a form element must have a value
f. required
Question 22
Modern browsers can perform many validation tasks themselves without any extra JavaScript.Correct Answer:
TrueQuestion 23
To check if an option button is selected, you access the value of its ____ property.Correct Answer:
b. Question 24
To send the values entered in a form to a web server with JavaScript, you use the __________ method.Correct Answer: Evaluation Method Correct Answer Case Sensitivity
Exact Matchsubmit
Exact Matchsubmit() Question 25
The ____ event fires when a form is submitted.Correct Answer:
d.
0 comments:
Post a Comment