过滤CSV files (.csv):
<input id="fileSelect" type="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />
过滤Excel文件- (.xls), use:
<input type="file" accept="application/vnd.ms-excel" />
过滤Excel文件(.xlsx):
<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
过滤文本文件(.txt) :
<input type="file" accept="text/plain" />
过滤图片文件 (.png/.jpg/etc),:
<input type="file" accept="image/*,.jpeg" />
过滤 网页文件(.htm,.html):
<input type="file" accept="text/html" />
过滤视频文件 (.avi, .mpg, .mpeg, .mp4):
<input type="file" accept="video/*" />
过滤声音文件 (.mp3, .wav, etc):
<input type="file" accept="audio/*" />