1.3.7 - Getting and Setting Form Values Flashcards
What is a
< fieldset >
Group elements in a form

What is a
< legend >
Defines a legend for the fieldset element

What is a
< label >
Defines a label for an input element. The for attribute of the label tag should be equal to the id attribute of the related element or bind them together

What is a
< abbr >
Defines an abbreviation or an acronym, like “Mr.” or “Dec”… are shortened versions of something else. Can give useful information to browsers, translation systems, and search engines.

What is a
< input >
Specifies an input field where the user can enter data. Used within form elements to declare input controls that allow users to input data;
can vary depending on the type attribute

What is a
< select >
Used to create a drop-down list

What is a
< option >
Inside the select element define the available options in the list

What is a
< textarea >
Defines a multi-line text input control, can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier)

What is the type attribute in an input element?
The type attribute specifies the type of input element to display. The default type is text
What is a type button attribute
Defines a clickeable button

Please define a checkbox input element
input type=”checkbox” name=”car” value=”volvo”
input type=”checkbox” name=”car” value=”audi”

What is a date type attribute
Defines a date control (year, month and day ( no time ) )

what is a datetime-local type attribute
Defines a date and time control

what is an email type attribute
Defines a field for an e-mail address
What is a file type attribute
Defines a file-select field and a “browse…” button ( for file uploads )
What is a hidden type attribute
Defines a hidden input field

What is a type image attribute
Defines an image as the submit button

What is the password type attribute
Defines a password

What is a input type radio buton
Defines a radio button

What is a input type range
Defines a control for entering a number whose exact value is not important (like a slider control. Default range is from 0 to 100

what is a input type submit
Defines a submit button
What is a input type tel
Defines a field for entering a telephone number

What is a input type time field
Defines a control for entering a time ( no time zone )

what does:
document.forms
Returns a collection of the form elements within the current document.

How can we get a form by it´s Id
document.getElementById( ‘id-of-form’ );

what happens when we get with
document.getElementsByName( ‘name-of-form’);
Get an element by name, returns a collection/kind of array with the given name.

How can we loop through from elements

How can we select the names and values of a form

How can we set a new value of a form

How can we hack a readonly field

On a checkbox, the default value get preserve?
