HTML相关知识和经验的碎片化记录 - yuzhihui
程序员文章站
2022-04-30 11:06:46
...
1、标签input在type="file"时,name是必须属性
1 form id="MainFileUpload" name="MainFileUpload" enctype="multipart/form-data"> 2 div class="cls_MainFileUpload"> 3 div class="cls_MainFileUpload2"> 4 img id="MainFileUploadBtnImg" class="cls_MainFileUploadBtnImg" alt="" src="" /> input class="cls_FileUpload" type="file"" id="{0}_FileUpload" name="FileUpload"/> 5 div> 6 div> 7 form>
标签input在type="file"时,name是必须属性,如果没有name属性,那么在表单提交时,文件不能被提交(即上传)
......