Upload image HTML <form> Tag Method property

Source: Internet
Author: User

<! DOCTYPE html>
<body>

<form action= "/example/html5/demo_form.asp" method= "Get" >
Select Image: <input type= "file" Name= "img" multiple= "multiple"/>
<input type= "Submit"/>
</form>
<p> try selecting more than one file while browsing the file. </p>

</body>

The browser uses the method property setting to route data from the form to the server for processing. There are two methods: the POST method and the GET method.

If the POST method is used, the browser will send the data in the following two steps. First, the browser will contact the form processing server specified in the Action property, and once the connection is established, the browser will send the data to the server in a segmented transfer.

On the server side, once the POST-style application starts executing, the parameters should be read from a flag location, and once the parameters are read, the parameters must be decoded before the application can use the form values. User-specific servers explicitly specify how the application should accept these parameters.

Another scenario is when a GET method is used, where the browser establishes a connection to the form processing server and then sends all the form data directly in a single transport step: The browser will attach the data directly to the action URL of the form. The two are separated by a question mark.

General browsers can transmit form information through either of these methods, whereas some servers only accept data provided by one of these methods. You can specify in the method property of the <form> tag how the form processing server will handle the data using the method to make the POST or GET.

Upload image HTML <form> Tag Method property

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.