如何在上传选择文件时就限制文件的类型

<input type="file" accept="application/msword" >

accept属性可以做到上传时,只显示规定的文件类型

accept=”application/pdf” 

accept=”image/gif” 

accept=”image/jpeg” 

accept=”text/html”

accept=”video/x-msvideo”

accept = ‘image/*’

猜你喜欢

转载自blog.csdn.net/cxfjava/article/details/86133819
今日推荐