1. Form Scripting 1.1 Basics
The <from> elements represent the form:
L Acceptcharset: The character set that the server can handle
L Action: The URL that accepts the request
L Elements: A collection of all controls in the form
L Enctype: Requested encoding type
L Length: Number of controls in the form
L Method: The type of HTTP request to send, usually a GET or post
L Name: Name of the form
L Reset (): Resets all forms to their default values
L Submit (): Submit Form
L Target: The name of the window used to send and accept request responses
1.2 Submitting a form
<input type= "Submit" value= "Submit"/>
<button type= "Submit" >submit</button>
<input type= "image" src= "Io.gif"/>
1.3 Resetting the form
<input type= "reset" value= "reset"/>
<button type= "Reset" >reset</button>
1.4 form fields
Common attributes:
L Disabled: Whether to disable
L form: points to the current form
L Name: Current field name
L ReadOnly: Whether read-only
L TabIndex: Toggle (tab) number
L Type: Field type
L Value: The value that the field submits to the server
1.5 text box
<input name= "name" type= "text" value= ""/>//Single line text box
<textarea name= "name" rows= "cols=" ">xx</textarea>//Multiline text box
1.6 Selection Box
<select name= "name" ></select>//Radio text box
<select name= "Name" multiple= "true" ></select>//multi-select text box
1.7 Rich Text editing
L Use contenteditable
L Use Document.execcommand ()
Javacript Advanced Programming-forms