浏览器支持情况
IE10及以上、Firefox、Chrome、Opera
不支持:IE-Edge
设置方式
支持单个
<input text="file" accept=".csv">
支持多个,逗号隔开
<input text="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel">
.csv格式
.csv
.xls格式
application/vnd.ms-excel
.xslx格式
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.png/.jpg/etc格式
text/plain
图片格式
image/*
.htm,.html格式
text/html
video(.avi, .mpg, .mpeg, .mp4)格式
video/*
audio(.mp3, .wav, etc)格式
audio/*
.pdf格式
.pdf