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

WBOY
Release: 2016-05-21 08:42:09
Original
1269 people have browsed it

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>
Copy after login
<span style="font-size: 14px;">标签input在type="file"时,name是必须属性,如果没有name属性,那么在表单提交时,文件不能被提交(即上传)</span><br><span style="font-size: 14px;">......</span>
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template