使用 acctpe属性即可

示例:

gif,jpg

<input type="file" name="pic" accept="image/gif,image.jpg" />

 

xls,xlsx

<input type="file" name="filedata" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />

相关文章:

  • 2022-02-07
  • 2021-08-04
  • 2021-12-18
  • 2021-05-02
  • 2021-06-30
  • 2021-11-23
  • 2021-08-25
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2022-01-05
  • 2022-02-09
  • 2022-02-09
  • 2021-10-26
相关资源
相似解决方案