HTML enctype 属性
定义和用法
enctype 属性指定表单数据在提交到服务器时应如何编码。
注释: enctype 属性只能在 method="post"时使用。
适用于
enctype 属性可用于以下元素:
| 元素 | 属性 |
|---|---|
| <form> | enctype |
实例
实例
发送编码为"multipart/form-data"的表单数据:
<form action="/action_page_binary.asp" method="post" enctype="multipart/form-data">
First name:<input type="text" name="fname"><br>
Last name:<input type="text" name="lname"><br>
<input type="submit" value="提交">
</form> 亲自试一试 »浏览器支持
| 属性 | |||||
|---|---|---|---|---|---|
| enctype | Yes | Yes | Yes | Yes | Yes |
