是HTML表单的application / x-www-form-urlencoded默认值? [英] is application/x-www-form-urlencoded default for html form?
问题描述
我发现HTML表单只支持两种enctype类型。它们是 application / x-www-form-urlencoded
和 multipart / form-data
。我知道当我需要上传文件时,我使用 multipart / form-data
。我何时使用 application / x-www-form-urlencoded
?它是默认的形式enctype?
I found out that HTML form supports only two enctype types. They are application/x-www-form-urlencoded
and multipart/form-data
. I understand that I use multipart/form-data
when I need to upload a file. When do I use application/x-www-form-urlencoded
? Is it default form enctype?
推荐答案
是的。以下是 W3 HTML表单规范中的一个引用:
Yes, it is. Here's a cite from the W3 HTML forms specification:
此属性的默认值为
application / x-www-form-urlencoded
。值multipart / form-data
应与INPUT
元素,type =file
。
网页浏览器会关注 URL编码。
这篇关于是HTML表单的application / x-www-form-urlencoded默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!