首頁 >web前端 >html教學 >HTML相关知识和经验的碎片化记录 - yuzhihui

HTML相关知识和经验的碎片化记录 - yuzhihui

WBOY
WBOY原創
2016-05-21 08:42:091293瀏覽

1、标签input在type="file"时,name是必须属性

<span style="color: #008080;">1</span>  <span style="color: #0000ff;"><span style="color: #800000;">form </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">MainFileUpload" name</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">MainFileUpload" enctype</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">multipart/form-data"</span><span style="color: #0000ff;">></span>                                                
<span style="color: #008080;">2</span>   <span style="color: #0000ff;"><span style="color: #800000;">div </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">cls_MainFileUpload"</span><span style="color: #0000ff;">></span>                                                       
<span style="color: #008080;">3</span>     <span style="color: #0000ff;"><span style="color: #800000;">div </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">cls_MainFileUpload2"</span><span style="color: #0000ff;">></span>
<span style="color: #008080;">4</span>      <span style="color: #0000ff;"><span style="color: #800000;">img </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">MainFileUploadBtnImg" class</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">cls_MainFileUploadBtnImg" alt</span><span style="color: #0000ff;">=""</span><span style="color: #ff0000;"> src</span><span style="color: #0000ff;">=""</span> <span style="color: #0000ff;">/></span>                                                                                                     <span style="color: #0000ff;"><span style="color: #800000;">input </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">cls_FileUpload" type</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">file"" id</span><span style="color: #0000ff;">="</span><span style="color: #ff0000;">{0}_FileUpload" name</span><span style="color: #0000ff;">="FileUpload"</span><span style="color: #0000ff;">/></span>                                                   
<span style="color: #008080;">5</span>      <span style="color: #0000ff;"></span><span style="color: #800000;">div</span><span style="color: #0000ff;">></span>                                                
<span style="color: #008080;">6</span>   <span style="color: #0000ff;"></span><span style="color: #800000;">div</span><span style="color: #0000ff;">></span>
<span style="color: #008080;">7</span>  <span style="color: #0000ff;"></span><span style="color: #800000;">form</span><span style="color: #0000ff;">></span></span></span></span></span></span>
<span style="font-size: 14px;">标签input在type="file"时,name是必须属性,如果没有name属性,那么在表单提交时,文件不能被提交(即上传)</span><br><span style="font-size: 14px;">......</span>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn