Form Elements
-
Elements are the INPUT tags used within a form.
-
The form object has an elements array to access the elements
of the form.
-
Thus, you can access elements two ways:
-
By array: document.formName.elements[n], where n is the
array index of the element. Handy if all of the elements are text
fields, and you want to make sure each field contains data.
-
By element name: document.formName.elementName. Handy when
each element has different validation rules.
-
So what are some form elements?
-
TEXT
-
TEXTAREA
-
BUTTON
-
CHECKBOX
-
RADIO
-
SELECT
Text Fields
Home
Internet II: Day 4