<input type="file" accept="image/*">
<input type="file" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
--------------只接收图片
<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">
或者:
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
---------------只接收excel表格