Javacript Advanced Programming-forms

Source: Internet
Author: User
Tags button type

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.