[](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2730%27%20height=%2730%27/%3e)
in html, form's attribute "enctype" means encoding type?
Yes, that's correct. In HTML, the enctype attribute of a form element specifies the encoding type that the browser should use when submitting the form to the server. The enctype attribute is used in conjunction with the method attribute, which specifies the HTTP method that should be used to submit the form data.
The enctype attribute has three possible values:
application/x-www-form-urlencoded (the default value) - This encoding is used when the form data is in the format of key-value pairs separated by ampersands (&). This is the most common encoding type used for form submissions.multipart/form-data - This encoding is used when the form contains binary data, such as files. This encoding type is typically used for file upload forms.text/plain - This encoding is rarely used and simply sends the form data as plain text.So, the enctype attribute specifies the encoding type that the browser should use to encode the form data before submitting it to the server.
[](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2730%27%20height=%2730%27/%3e)
the default value is with "GET" method?
Yes, that's correct. The default value of the enctype attribute for HTML forms is application/x-www-form-urlencoded when the method attribute is set to "GET".
When the method attribute of a form is set to "GET", the form data is appended to the URL as query parameters, and the enctype attribute is used to specify how the form data should be encoded.
If the enctype attribute is not specified in a form with method="GET", the browser will use the default encoding type application/x-www-form-urlencoded to encode the form data.
[](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2730%27%20height=%2730%27/%3e)
than if I use text/plain, when browser sumbit the text, browser use which kind of encoding? like "utf-8" , "euc-kr" etc
When the enctype attribute of a form is set to text/plain, the browser will send the form data as plain text without any encoding. This means that the text will be sent as-is, without any special character encoding.
If you want to ensure that the form data is sent using a specific character encoding, you should set the accept-charset attribute on the form element. The accept-charset attribute specifies the character encoding that the browser should use when submitting the form data to the server.
For example, if you want to ensure that the form data is sent using the UTF-8 character encoding, you can use the following form tag:
<form method="POST" action="/submit-form" enctype="text/plain" accept-charset="UTF-8">
<!-- form fields here -->
</form>