读书人

html页面表单交付

发布时间: 2012-11-23 22:54:33 作者: rapoo

html页面表单提交

?1.HTTP是如何提交表单的

<form>标签的属性enctype设置以何种编码方式提交表单数据。可选的值有三个:

?? application/x-www-form-urlencoded:

这是默认的编码方式。它只处理表单域里的value属性值,采用这种变法方式的表单会将表单域的值处理成URL方式。

??multipart/form-data:?

这种编码方式会以二进制流的方式来处理表单数据,这中编码方式会把文件域指定的文件内容也封装到请求参数里。

?? text/plain:

这种方式当表单的action属性值为mailto:URL的形式时比较方便,这种方式主要适用于直接通过表单发送邮件。

?

以上form表单的enctype属性的值决定了浏览器的行为,对应于http协议,如果选择'application/x-www-form-urlencoded'编码,http的请求头会有如下

?

`%0D%0A').The control names/values are listed in the order they appear in thedocument. The name is separated from the value by `=' andname/value pairs are separated from each other by `&'.参考:http://www.w3.org/TR/html401/interact/forms.html

读书人网 >CSS

热点推荐