HTML Form Enctype
Http://www.w3.org/TR/html401/interact/forms.html#h-17.13.1%E2%80%8D
enctype=
Content-type [CI]
This
attribute specifies the content type used to submit the form to the server if
Resolves a method that request.getparameter () gets no value when the form's enctype= "Multipart/form-data"
Url:http://blog.csdn.net/georgejin/archive/2007/07/25/1706647.aspx
Today in the original upload file page on the basis of a file to add a
The form form in HTML has a key attribute enctype=application/x-www-form-urlencoded or Multipart/form-data.1, enctype="application/x-www-form-urlencoded" is the default encoding method, when the data is submitted in this way, the content of the HTTP
Brief introductionThe Enctype property of a form is encoded in two common ways:application/x-www-form-urlencoded and multipart/form-data, which default to Application/x-www-form-urlencoded.When action is get , the browser uses x-www-form-urlencoded
Enctype= ' Multipart/form-data 'HTML forms provide three methods of encoding.
Application/x-www-form-urlencoded (the default)
Multipart/form-data
Text/plain
upload a file in the form to add attributes enctype=
In HTML, the form label is used to submit the form. The form label has a enctype property.The enctype property specifies how the form data should be encoded before it is sent to the server that is, in the syntax of the form element, enctype
Enctype is the encoding type used by the browser when data is sent back to the server. The encoding types are as follows. The following example shows how to use Enctype in detail: specifies the encoding type used by the browser when data is sent
The first thing to know is that the Enctype property manages the MIME encoding of the form. A total of three values are optional:1, application/x-www-form-urlencoded2, Multipart/form-data3, Text/plainWhere application/x-www-form-urlencoded is the
Function of the enctype attribute of form labels, formenctype
Enctype is the encoding type used by the browser when data is sent back to the server. The encoding types include:
1. application/x-www-form-urlencoded
This is the default encoding type
When uploading files, we encountered a strange problem. IE6, 7, and 8 always failed to upload files, and the server could not receive files. We all knew that we wanted form to be able to submit files, you need to specify the attribute of enctype =
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.