JavaScript DOM may be used to manipulate form elements trhough and array or directly. The table below is showing properties and methods that are approachable by DOM.
PROPERTY |
DEFINITION |
DESCRIPTION |
---|
acceptCharset |
property |
Sets or resets the accept-charset attribute. |
action |
property |
Specifies which action to take after submission. |
autocomplete |
property |
Sets the autocomplete attribute to OFF or ON. |
disabled |
property |
Sets a field to be disabled or reads if it already is disabled. |
elements[] |
property |
Returns collection of elements. |
enctype |
property |
Specifies the enctype attribute. |
form |
property |
Points which form (in multiform concept) a field belongs to. |
length |
property |
Reads how many elements there are in a form. |
method |
property |
Defines or reads the method attribute of a form. |
name |
property |
Sets or returns the name of an element. |
noValidate |
property |
Declares whether to validate or not a form. |
readonly |
property |
Sets a field to be readonly or reads if it already is readonly. |
reset() |
method |
Resets all elements in a form. |
submit() |
method |
Submits the form. |
tabIndex |
property |
Defines the order of TAB. |
target |
property |
Spcifies the target attribute for a form. |
type |
property |
Sets or returns the type of an input field. |
value |
property |
Reads or writes the value of a field. |
PROPERTY |
DEFINITION |
DESCRIPTION |
---|
color |
property |
Input allows user to select a color. |
date |
property |
Input allows user to select a date. |
datetime |
property |
Input allows user to select a date and time with timezone. |
email |
property |
Input allows user to enter an email. |
month |
property |
Input allows user to select a month. |
number |
property |
Input allows user to enter a number. |
range |
property |
Input allows user to enter a number within a range. |
search |
property |
Input is used as search field. |
tel |
property |
Input allows user to enter a telephone number. |
time |
property |
Input allows user to select a time without timezone. |
url |
property |
Input allows user to enter an URL. |
week |
property |
Input allows user to select a week. |
PROPERTY |
DEFINITION |
DESCRIPTION |
---|
options[] |
property |
Returns collection of options. |
disabled |
property |
Sets a select field to be disabled or reads if it already is disabled. |
form |
property |
Returns the form reference for the drop-down. |
length |
property |
Reads how many elements there are in a drop-down.. |
multiple |
property |
Defines if more then one option may be selected. |
name |
property |
Sets or returns the name of an element. |
size |
property |
Sets or returns how many options are visible. |
selectedIndex |
property |
Sets or returns the selected option. |
type |
property |
Returns the type of a drop-down list, select one or multiple. |
value |
property |
Returns the value of selected option. |
add() |
method |
Adds an option to a list at the point given as an argument. |
remove() |
method |
Removes an option from a list. |
Comments
No comments have been made yet.
Please login to leave a comment. Login now