當前位置:軟件學堂 > 資訊首頁 > 網(wǎng)絡編程 > DIV+CSS > 表單中的編碼方式enctype

表單中的編碼方式enctype

2012/11/21 15:09:48作者:佚名來源:網(wǎng)絡

移動端

【實例介紹】

表單中的編碼方式enctype

enctype用于設置表單信息提交的編碼方式。

【基本語法】

<form enctype="編輯方式">
···
</form>

【語法介紹】

enctype的屬性值如表所示。

enctype標記的屬性值
屬性                                                                     描述
Text/plain                                                    以純文本的形式傳送信息
application/x-wwwcfrom-urlencoded    默認的編碼形式
multipart/from-data-mime編碼              傳文件時必須選擇該項

【實例代碼】

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>處理動作</title> </head> <body> <table width="100%" cellspacing="0" cellpadding="0">   <tr>     <td><form action="mailto:weixiao@foxw.com" name="form1" method="post" enctype="application/x-www-form-urlencoded" >     </form></td>   </tr> </table> </body> </html>

【代碼分析】

在代碼中,加粗的代碼標記將表單的編碼方式設置為application/x—www—form—urlencoded,即默認的編碼形式。

 【素材及源碼下載】

請點擊:表單中的編碼方式enctype 下載本實例相關素材及源碼

 

標簽: 表單  編碼方式