html input标签上传文件限制格式(后缀名)的几种方式

1.accept属性
<input type="file" id="excelTemplateFile" name="excelTemplateFile" accept=".xls,.xlsx" />
2.通过js来限制
皮皮鲁
原文地址:https://www.cnblogs.com/mizhifei/p/10843548.html