HTML5的input:file上传类型控制
来源:互联网 发布:程序员薪资 知乎 编辑:程序博客网 时间:2024/06/04 19:01
一、input:file属性
属性值有以下几个比较常用:
accept:表示可以选择的文件MIME类型,多个MIME类型用英文逗号分开,常用的MIME类型见下表。
multiple:是否可以选择多个文件,多个文件时其value值为第一个文件的虚拟路径。
1、accept
只能选择png和gif图片
<input id="fileId1" type="file" accept="image/png,image/gif" name="file" />
2、multiple
多文件上传
<input id="fileId2" type="file" multiple="multiple" name="file" />
3、常用MIME类型
后缀名 MIME名称*.3gpp audio/3gpp, video/3gpp*.ac3 audio/ac3*.asf allpication/vnd.ms-asf*.au audio/basic*.css text/css*.csv text/csv*.doc application/msword *.dot application/msword *.dtd application/xml-dtd *.dwg image/vnd.dwg *.dxf image/vnd.dxf*.gif image/gif *.htm text/html *.html text/html *.jp2 image/jp2 *.jpe image/jpeg*.jpeg image/jpeg*.jpg image/jpeg *.js text/javascript, application/javascript *.json application/json *.mp2 audio/mpeg, video/mpeg *.mp3 audio/mpeg *.mp4 audio/mp4, video/mp4 *.mpeg video/mpeg *.mpg video/mpeg *.mpp application/vnd.ms-project *.ogg application/ogg, audio/ogg *.pdf application/pdf *.png image/png *.pot application/vnd.ms-powerpoint *.pps application/vnd.ms-powerpoint *.ppt application/vnd.ms-powerpoint *.rtf application/rtf, text/rtf *.svf image/vnd.svf *.tif image/tiff *.tiff image/tiff *.txt text/plain *.wdb application/vnd.ms-works *.wps application/vnd.ms-works *.xhtml application/xhtml+xml *.xlc application/vnd.ms-excel *.xlm application/vnd.ms-excel *.xls application/vnd.ms-excel *.xlt application/vnd.ms-excel *.xlw application/vnd.ms-excel *.xml text/xml, application/xml *.zip aplication/zip *.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
http://www.haorooms.com/post/input_file_leixing
阅读全文
0 0
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制
- HTML5的input:file上传类型控制
- HTML5的 input:file上传类型控制
- 【转】HTML5的 input:file上传类型控制
- HTML5的 input:file上传类型控制 与上传多文件
- HTML input-file 上传类型控制
- html5 file上传,input file
- JSP的九大内置对象,七大动作指令,四个作用域,三个编译指令
- 幽默原理之机智幽默笔记
- R连接oracle数据库Error in odbcFetchRows negative length vectors are not allowed解决方法
- GCC __builtin_expect的作用
- CentOS下实现SCP免输密码传送文件
- HTML5的input:file上传类型控制
- Web开发入门不得不看
- 高频访问IP限制 --Openresty(nginx + lua) [反爬虫之旅]
- SAP_BW之DSO(数据存储对象)
- C++类内存分布
- 将推送到手机的消息转换成语音自动播放的实现(如支付到账语音通知)
- HTML与css
- PAT A 1094. The Largest Generation (25)
- Linux定时任务Crontab命令详解