|
|||||||||
![]() |
|
The FORM elementA single form is enclosed within <FORM> and </FORM> tags. There may be a number of independent forms within a document, but forms cannot be nested. Horizontal rule tags (<HR>) are often used to set off individual forms. The syntax of the FORM element is:
<FORM [ACTION="url"] [METHOD="method"] [ENCTYPE="type"] > field definitions </FORM> All the attributes of the FORM element are optional and have default values. The ACTION attribute specifies the URL of the script that will process the form and defaults to the URL of the document. This URL must use the HTTP protocol, since the method of sending data is currently only defined using this protocol.
The METHOD attribute specifies the HTTP
method by which the data is sent to the server. There are two
possibilities: GET or POST, defaulting to
GET. The GET method appends the encoded data to the
URL, sometimes causing truncation problems. The POST method
sends the data as a separate stream and does not suffer from this
limitation. The HTTP protocol is described in
Section
The ENCTYPE attribute specifies how the
data is encoded. Currently there is only one possible value,
x-www-form-encoded, which is also the default.
Chapter
Within a FORM element you can use the elements
INPUT, SELECT and
TEXTAREA to specify input fields, as well as the
normal HTML elements described in Chapters The contents of data fields are sent to the specified server when the user submits the form.
![]() ![]() ![]() ![]() ![]() Next: Defining fields Up: Fill-out Forms Previous: Fill-out Forms
|
||||||
Copyright © 1996-2002 Ford & Mason Ltd |
![]() |