HTML Learning Note 8: Forms

Source: Internet
Author: User

  What is a form?      A Web form can send user-entered data to the server for processing. Because Internet users use checkboxes, radio buttons, or text fields to fill out a form, the WebForms form resembles a file or database. For example, WebForms can be used to order products that enter shipping or credit card information, or can be used to retrieve data (for example, search on search engines).     <!--from wiki - >      simply to collect information from users   This is the workflow of a form form: The user opens the page- > After filling out the form and submitting it according to the appropriate way to send server--server received after the transfer to the appropriate program processing infrastructure:<form></form>        Add table cell element <input> form input tag syntax under form: <input type= "" Name= "" ....../> attribute:    name: First Name, The server uses the name recognition group, the same group needs the same name name     maxlength: Specifies the maximum length of the input     size: The size of the text box, in characters, the default is 20     value: Default value, content submitted to server     placeholder: Prompt text type:    text: Enter text, properties:      password: Password box, automatically hide password     file: Upload file, display content related to browser     radio: Radio box, Options that require a single selection require the same name, return value to the server to identify what is selected, and add checked to determine the default options.     checkbox: check box, similar to the radio rule.     button: With JS to provide action, value bit button display content    &NBSP;SUBM: Submit button, with JS will be a foThe form within RM is sent to the server, the value bit button displays content     reset: Restores the form's forms to the default state, the value values bit button displays the contents     hidden: Hidden Fields, The user does not see the value passed to the server.     image: Image domain submission, same as submit function, SRC Place image address. <select> drop-down menu and list label syntax <option> selected content </option>       Option Property:            Size: The number of displays, greater than 1 o'clock, is displayed as a list.             Multiple: Ctrl + multiple selection, drop-down menu variable list             selected: Default     option Rico add <optgroup> Group name </optgroup> to group options <textarea> </textarea> multiline text fields     Basically, as with <input> text, the cols and rows properties are more. Row controls the number of rows displayed, cols the width of the display. Form Properties     action: The destination, URL, or server file that the form is sent to.        method: Specify how the form is sent to the server with Get, post two methods, get         by default         get: Use URL to pass parameters (the returned URL can see the contents of the form), there is a limit on the number of messages sent, generally used for user information acquisition.                POST: The form data is part of the HTTP request content and has no limit on the number of messages sent, and is typically used to modify resources on the server.        name: The name of the form.        traget: Where to open the action URL parameter: _blank, _self, _parent, _top        Enctype: How to encode the form before sending it, parameters are: 1: Default mode application/x-www-form-urlencoded 2:multipart/form-data 3:text/plain 

HTML Learning Note 8: 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.