Chapter 6 Flashcards

1
Q

Which attribute enhances usability in modern browsers?

A

placeholder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which type value for the input element triggers validation in modern browsers?

A

number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

document.getElementsByTagName(“form”)[0], you could use the code

A

document.forms[0]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Use of the ____ attribute of the form element is not allowed in the strict DTD for XHTML.

A

name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Many aspects of the way browsers present browser-based validation feedback are customizable through the properties and methods of the​ ____.

A

constraint validation API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In modern browsers, which attribute of an input element prevents the form from being submitted if the field is left blank?

A

required

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Displays a validation error in a modern browser

A

bubble

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

​Reduce the likelihood of user errors when completing a form

A

assistive functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Enables customization of validation feedback in modern browsers

A

constraint validation API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Persistence required for a user to accomplish a goal

A

​friction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Determines whether a value is not a number

A

isNaN() function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Checking that information provided by users conforms to rules

A

validation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Provides guidance about what data should be entered in a text box

A

placeholder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If all its properties are false, then its value is true

A

validity object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Stops a form from being submitted when the submit event is triggered

A

preventDefault()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Indicates that a form element must have a value

A

required

17
Q

The ____ event fires when a form is submitted.

A

submit

18
Q

For any fields that require numeric values, you can use JavaScript’s built-in ____ function to determine whether a user actually entered a number.

A

isNaN()

19
Q

Which form element is useful for limiting user options to a set of choices?

A

​selection list

20
Q

You can use the CSS ____ pseudo-classes to change the properties of form elements based on their validity status.

A

invalid and :valid

21
Q

You create an empty document fragment using the ____ method.​

A

​createDocumentFragment()

22
Q

To check a group of fields and trigger an error message if any of them is empty, you use a(n) ____ statement.

A

​loop

23
Q

When a control’s value is found to be invalid during constraint validation, the ____ event is triggered.

A

invalid

24
Q

Which attribute toggles off validation of a form when added to the opening tag?

A

novalidate

25
Q

To display no default value on a selection list, you set its ____ property to -1

A

selectedIndex

26
Q

What element property would you use when copying the contents of one text field to another text field?​

A

value

27
Q

You use the ____ method on an object to block the action normally associated with an event.​

A

​preventDefault()

28
Q

To check if an option button is selected, you access the value of its ____ property.

A

checked

29
Q

In general, modern browsers display validation feedback after the ____ event is triggered by a form.​

A

submit

30
Q

Validation errors found by modern browsers are reported in​ ____.

A

bubbles