HTML learning Note (ix) Form

Source: Internet
Author: User

 The HTML form label is a series of combinations that are wrapped up with a closed <form> tag. The purpose of the form is to include the data that we want to submit to the server and then submit it to the server for processing. ( using forms is one of the ways that the browser submits client data to the server, and other methods involve the ASP . ).

Code Demo

1 <HTML>2     <Head></Head>4     <Body>5         <formAction=""Method= "POST">6             <inputtype= "text"name= "Name"value="" />7             <inputtype= "Submit" />8         </form>9     </Body>Ten </HTML>

  In the Form tab, the text box uses <input type= "text"/>, the submit button <input type= "Submit"/> the input (input) label, If data is to be submitted to the server, the data is treated as a key-value pair , and the input tag must have the name attribute and the value property, which form "Name:value".

Run results

  

Property

  The action property of the form tag indicates the address to which the data is to be submitted (that is, where the submitted data is received after clicking the Submit Query button above)

  The method attribute value is divided into get and post Two request methods,GET request is sent by adding the data as a parameter to the requested URL , that is, after the, in the form of key-value pairs sent to the request address. However, the amount of data that can be sent in this way is limited, so when the data is large, the Post method is used to add the data to the sending paper.

HTML learning Note (ix) Form

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.