input:file上传文件类型(记录)
imput 属性有以下几种:
1.type:input类型这就不多说了
2.accept:表示可以选择的文件类型,多个类型用英文逗号分开,常用的类型见下表。
<input id="file" type="file" accept="image/png,image/gif" name="file" />
- 1
3.multiple:是否可以选择多个文件,多个文件时其value值为第一个文件的虚拟路径。
<input id="files" type="file" multiple="multiple" name="file" />
- 1
下面就是各种文件类型
*.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.sheetinput:file上传文件类型(记录)的更多相关文章
- 在HTML5的 input:file 上传文件类型控制 遇到的问题
		1.input:file 属性的介绍 先瞅代码吧 <form> <input type="file" name="pic" accept=& ... 
- input file 上传文件类型控制
		文件类型 accept *.3gpp audio/3gpp, video/3gpp.ac3 audio/ac3.asf allpication/vnd.ms-asf.au audio/basic.cs ... 
- ajax+ashx 完美实现input file上传文件
		1.input file 样式不能满足需求 <input type="file" value="浏览" /> IE8效果图: Firefox效 ... 
- input 限制 上传文件类型
		参考:input file控件限制上传文件类型 HTML <input> 标签的 accept 属性 网页上添加一个input file HTML控件: <input id=&quo ... 
- HTML5的 input:file上传 以及 类型控制
		以HTML5的文件上传API 如下demo代码在.html文件打开即可: !DOCTYPE html> <html lang="zh_cn"> <head& ... 
- input file 上传文件
		面试的时候遇到一个问题,要求手写的方式上传文件. 本来觉得很简单,但是结果怎么也成功不了. 前台: <form ID="form1" action="AcceptF ... 
- input file上传文件
		如何使用input[type='file']来上传文件呢? html: //angular<input type="file" (change)="fileChan ... 
- 巧妙利用label标签实现input file上传文件自定义样式
		提到上传文件,一般会想到用input file属性来实现,简单便捷,一行代码即可 但input file原生提供的默认样式大多情况下都不符合需求,且在不同浏览器上呈现的样式也不尽相同 我们往 ... 
- 使用input file上传文件中onChange事件只触发一次问题
		每次上传文件的时候,都会将当前的文件路径保存至$event.target.value中,当第二次选择文件时,由于两次$event.target.value相同,所以不会触发change事件. 解决方案 ... 
随机推荐
- CF575A Fibonotci [线段树+矩阵快速幂]
			题意 \(s\{\}\) 是一个循环数列 循环节为 \(n\),你可以改掉 \(m\) 项,这 \(m\) 项独立,且不影响循环节 考虑线段树维护矩阵,单点修改最多m次,每次矩阵快速幂就完事了 // ... 
- 微信小程序--骰子游戏
			寒假老师让制作一个小程序,于是开始学习如何制作微信小程序. 第一步,拥有一个小程序帐号, 在这个小程序管理平台,你可以管理你的小程序的权限,查看数据报表,发布小程序等操作. 我用的是微信web开发工具 ... 
- PUT方法写shell
			前言: PUT是http的一个请求方法 PUT的前提,是了解HTTP协议.下面给出HTTP - PUT的一个模板: PUT /test.txt HTTP/1.1 Accept: */* Accept- ... 
- P1462 通往奥格瑞玛的道路【二分+Dij】
			P1462 通往奥格瑞玛的道路 提交 29.89k 通过 6.88k 时间限制 1.00s 内存限制 125.00MB 题目提供者gconeice 难度提高+/省选- 历史分数100 提交记录 查看题 ... 
- 论文阅读笔记(十一)【ICCV2017】:Jointly Attentive Spatial-Temporal Pooling Networks for Video-based Person Re-Identification
			Introduction (1)Motivation: 当前采用CNN-RNN模型解决行人重识别问题仅仅提取单一视频序列的特征表示,而没有把视频序列匹配间的影响考虑在内,即在比较不同人的时候,根据不同 ... 
- MySQL优化(三)——主从复制
			1.MySQL高可用 主从复制 一主多备 多主多备 2.MySQL主从复制 主机所有写的数据都会生成二进制SQL日志执行文件,从机只 ... 
- A Bug's Life____并查集
			English preparation: falsify 伪造:篡改:歪曲:证明...虚假 the sexual behavior of a rare species of bugs. 一种稀 ... 
- vue自学入门-4(vue slot)
			vue自学入门-1(Windows下搭建vue环境) vue自学入门-2(vue创建项目) vue自学入门-3(vue第一个例子) vue自学入门-4(vue slot) vue自学入门-5(vuex ... 
- 《你不知道的javascript(上)》笔记
			作用域是什么 编译原理 分词/词法分析 这个过程会将由字符组成的字符串分解成(对编程语言来说)有意义的代码块,这些代码块被称为词法单元 解析/语法分析 词法单元流(数组)转换成一个由元素逐级嵌套所组成 ... 
- Java_Day4(下)
			Java learning_Day4(下) 本人学习视频用的是马士兵的,也在这里献上 <链接:https://pan.baidu.com/s/1qKNGJNh0GgvlJnitTJGqgA> ... 
