Access and secure data (26%) Flashcards
What type of input provides a color picker?
color
What type of input provides a date picker?
date
What type of input provides a date/time picker?
datetime
What type of input enables users to select a numeric month and year?
month
What type of input enables users to select a numeric week and year?
week
What type of input enables users to select a time of day?
time
What type of input forces the input to be numeric?
number
What type of input forces the input to be a properly formatted email address?
What type of input allows users to select a value within a range by using a slider bar?
range
What type of input formats entered data as a phone number?
tel
What type of input formats entered data as a properly formatted URL?
url
What type of input displays a radio button?
radio
What type of input displays a checkbox?
checkbox
What type of input displays a masked textbox for passwords?
password
What type of input displays a button?
button
What type of input resets all HTML elements within a form?
reset
What type of input posts the form’s data to the web server?
submit
What type of input displays a textbox?
text
What is the syntax to define a textarea with a specified number of columns and rows?
<textarea></textarea>
What formats does the url input accept?
Absolute URL’s with protocol unless overridden with the pattern attribute.
Which input cannot have a default value or be updated with JavaScript?
password
How do you default a checkbox input to be checked?
Add the checked attribute
How do you create a radio button group?
Set the name attributes of the radio inputs to the same value.
<tr>
<td>
Rate your experience:
</td>
<td>
<input></input> 1 - Very Poor
<input></input> 2
<input></input> 3
<input></input> 4
<input></input> 5 - Very Good
</td>
</tr>
What types of elements can act as buttons?
Anything can be a button if it has a click event or a mousedown and mouseup event.
What are the six default button types?
<input type="button" <button type="button" <input type="reset" <button type="reset" <input type="submit" <input type="submit"
Which button element provides default text for display?
input
The button element does not automatically provide default text to display as the input element does.
Which attribute is used to make a control read-only?
readonly
Which attribute is used to spellcheck the user’s input?
spellcheck
Which attribute is used to validate the user’s input against a regular expression?
pattern
Which inputs support the pattern attribute?
text, search, url, tel, email, and password
Which attribute is used to display watermark text?
placeholder
Which attribute makes the input required?
required
What character is used to enclose regular expressions in JavaScript?
The forward slash (/)
var s = $('#regExString').val(); var regExpression = /^[A-Z,a-z]\d[A-Z,a-z][\s{1}]?\d[A-Z,a-z]\d/; if (regExpression.test(s)) alert("Valid postal code."); else alert("Invalid postal code.");
What two methods are available on regular expression objects?
test and exec
What method on the regular expression object returns true if the string matches the pattern?
test
What method on the regular expression object returns the portion of the string that matches the pattern or null if not match is found?
exec