码迷,mamicode.com
首页 > 其他好文 > 详细

关于input file文件提交选择格式

时间:2016-05-04 17:23:53      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:

<input type="file" />浏览时只显示指定文件类型

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

accept属性列表:

1.accept="application/msexcel"
2.accept="application/msword"
3.accept="application/pdf"
4.accept="application/poscript"
5.accept="application/rtf"
6.accept="application/x-zip-compressed"
7.accept="audio/basic"
8.accept="audio/x-aiff"
9.accept="audio/x-mpeg"
10.accept="audio/x-pn/realaudio"
11.accept="audio/x-waw"
12.accept="image/gif"
13.accept="image/jpeg"
14.accept="image/tiff"
15.accept="image/x-ms-bmp"
16.accept="image/x-photo-cd"
17.accept="image/x-png"
18.accept="image/x-portablebitmap"
19.accept="image/x-portable-greymap"
20.accept="image/x-portable-pixmap"
21.accept="image/x-rgb"
22.accept="text/html"
23.accept="text/plain"
24.accept="video/quicktime"
25.accept="video/x-mpeg2"
26.accept="video/x-msvideo"

27.或者直接(.apk)其他格式都行

 

如果不限制图像的格式,可以写为:accept="image/*"。同样也可以设置多个属性值的,根绝属性值选择需要!

关于input file文件提交选择格式

标签:

原文地址:http://www.cnblogs.com/houzhao/p/5458853.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!