<form>
The <form> element acts as container for controls elements.
Contents | A combination of one element <input type=”submit”> and
| ||
---|---|---|---|
Attributes | attributes | values (Default are bolded) | description |
action | URL | Specifies a form processing agent. User agent behavior for a value other than an | |
method | get | Specifies the HTTP method used to send the form to the processing agent. Only get |
<input>
The <input> element represents editable area
Contents | Empty | ||
---|---|---|---|
Attributes | attributes | values (Default are bolded) | description |
type | text | Specifies the type of control to create. | |
name | text | Assigns name to the control. Not used for type=”submit”. Some names are reserved for Gigaset systems (see [5]). | |
value | text | Specifies the initial value of the control. Mandatory for type=”radio” and type=”checkbox”. | |
disabled | disabled | When set for a form control, this Boolean attribute disables the control for user input. | |
checked | checked | Specifies the state of a button. Valid for type=”radio” and type=”checkbox”. | |
inputmode | text | Specifies appropriate input mode for the text input expected in an associated input control. text: all available characters digits: digits only: 0…9 dialpad: dial characters: 0…9 and #, *, P, R | |
maxlength | 1..32 | Specifies the maximum number of editable characters. Valid for type="text" and type="password" | |
Example: | |||
<body> <form action="http://host.com/adddata" method="get"> <p>text description</p> <p>Text: <input type="text" name="input1" maxlength="12" value="default" /></p> </form> </body> |
<select>
The <select> element indicates list with options.
Contents | One or more of the following elements: <option> | ||
---|---|---|---|
Attributes | attributes | values (Default are bolded) | description |
disabled | disabled | When set for a form control, this boolean attribute disables the control for user input. | |
name | text | Assigns a name to the control. | |
Example: | |||
<body> <form action="http://host.com/adddata" method="get"> <p>Color: <select name="colors"> <option value="1">red</option> <option value="2" selected="selected">green</option> <option value="3">blue</option> </select> </p> <input type="submit" value="Submit"/> </form> |
<option>
The <option> element represents choice of menu created by <select>
Contents | One or more of the following elements: text | ||
---|---|---|---|
Attributes | attributes | values (Default are bolded) | description |
value | text | Specifies initial value to the control. | |
selected | selected | When set, this boolean attribute specifies that this option is pre-selected . |
<textarea>
Element allows the creation of a multiline text window for textual user input.
Contents | One or more of the following elements: text | ||
---|---|---|---|
Attributes | attributes | values (Default are bolded) | description |
name | text | An attribute used to assign a variable name to a form control. The name should be unique within the document | |
Example: | |||
<body> <form method="get" action="edit_result.jsp"> </body> |