input文件选择,限定文件类型

input选择文件——限制类型

添加 accept 属性

<input type="file" accept="">

excel 文件:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel

原文地址:https://www.cnblogs.com/dreamstartplace/p/15205596.html