Name
Form — an HTML input form
Availability
JavaScript 1.0 Inherits from HTMLElement
Synopsis
document.form_namedocument.forms[form_number]
Properties
Form inherits properties from HTMLElement and defines or overrides the following:
-
action A read/write string (read-only in IE 3) that specifies the URL to which the form data is sent when the form is submitted. The initial value of this property is specified by the
actionattribute of the<form>HTML tag. Usually, this URL specifies the address as a CGI script, although it can also be amailto:ornews:address.-
elements[] An array of input elements that appear in the form. Each element is a Button, Checkbox, Hidden, Password, Radio, Reset, Select, Submit, Text, or Textarea object. See the Form.elements[] reference page.
-
encoding A read/write string (read-only in IE 3) that specifies how form data is encoded for transmission when the form is submitted. The initial value of this property is specified by the
enctypeattribute of the<form>tag. The default value is “application/x-www-form-urlencoded”, which is sufficient for almost all purposes. Other values may sometimes be necessary. For example, a value of “text/plain” is convenient when the form is submitted by email to amailto:URL. See CGI Programming on the World Wide Web, by Shishir Gundavaram (O’Reilly), for further information.-
length The number of elements in the form. Equivalent to
elements.length.-
method A read/write string (read-only in IE 3) that specifies the ...