当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM enctype 属性
The enctype property sets or returns the MIME type used to encode the content of the form.
enctype属性可设置或返回表单内容的MIMIE类型
If the form has no enctype attribute, the default value when submitting text is "application/x-www-form-urlencoded".
如果表单没有enctype属性,默认的值为:"application/x-www-form-urlencoded".
When input type is "file", the value should be "multipart/form-data".
当内容为“文件”,值应该为"multipart/form-data"
formObject.encoding=encoding |
The following example returns the encoding type of the form:
下面的举例将返回表单的encoding类型:
<html> <form id="myForm" enctype="application/x-www-form-urlencoded"> </body> |
Get the encoding type of a form
得到表单的encoding类型