文件类型 accept

*.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 application/zip
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
.potx application/vnd.openxmlformats-officedocument.presentationml.template
.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
.sldx application/vnd.openxmlformats-officedocument.presentationml.slide
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
.xlsm application/vnd.ms-excel.addin.macroEnabled.12
.xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12

追加!!!!!!!

在上传图片时, accept不要设置成 accept="image/png,image/jpg,image/jpeg"!

后果: 浏览图片时不会自动进入相册,默认打开的是最近使用文档文件夹 但是最近的显示为空,而且图片会变灰选择不了,因为这个,我TM被老板骂惨了!5555555

直接设置成 accept="image/*" ;

望周知.

input file 上传文件类型控制的更多相关文章

  1. 在HTML5的 input:file 上传文件类型控制 遇到的问题

    1.input:file 属性的介绍  先瞅代码吧 <form> <input type="file" name="pic" accept=& ...

  2. HTML5的 input:file上传 以及 类型控制

    以HTML5的文件上传API 如下demo代码在.html文件打开即可: !DOCTYPE html> <html lang="zh_cn"> <head& ...

  3. input:file上传文件类型(记录)

    imput 属性有以下几种: 1.type:input类型这就不多说了2.accept:表示可以选择的文件类型,多个类型用英文逗号分开,常用的类型见下表. <input id="fil ...

  4. input 限制 上传文件类型

    参考:input file控件限制上传文件类型 HTML <input> 标签的 accept 属性 网页上添加一个input file HTML控件: <input id=&quo ...

  5. ajax+ashx 完美实现input file上传文件

    1.input file 样式不能满足需求 <input type="file" value="浏览" /> IE8效果图:    Firefox效 ...

  6. input file 上传文件

    面试的时候遇到一个问题,要求手写的方式上传文件. 本来觉得很简单,但是结果怎么也成功不了. 前台: <form ID="form1" action="AcceptF ...

  7. input file上传文件

    如何使用input[type='file']来上传文件呢? html: //angular<input type="file" (change)="fileChan ...

  8. 巧妙利用label标签实现input file上传文件自定义样式

    提到上传文件,一般会想到用input file属性来实现,简单便捷,一行代码即可    但input file原生提供的默认样式大多情况下都不符合需求,且在不同浏览器上呈现的样式也不尽相同   我们往 ...

  9. 使用input file上传文件中onChange事件只触发一次问题

    每次上传文件的时候,都会将当前的文件路径保存至$event.target.value中,当第二次选择文件时,由于两次$event.target.value相同,所以不会触发change事件. 解决方案 ...

随机推荐

  1. ivew 【provide/inject] 页面刷新实现reload

    1.App.vue <template> <div id="app"> <router-view v-if="isRouterAlive&q ...

  2. 使用字符流(Writer、Reader)完成对文件的读写操作

    字符流 字符输出流:Writer,对文件的操作使用子类FileWriter 字符输入流:Reader,对文件的操作使用子类FileReader 每次操作的是一个字符 文件字符操作流会自带缓存,默认大小 ...

  3. springBoot相关(一)

    2.0新特性: 编程语言: Java8+.Kotlin 底层框架:Spring Framwork 5.0.x 全新特性: web Flux web Flux: 函数编程:java 8 Lambda 响 ...

  4. 【leetcode】1014. Capacity To Ship Packages Within D Days

    题目如下: A conveyor belt has packages that must be shipped from one port to another within D days. The  ...

  5. 【leetcode】564. Find the Closest Palindrome

    题目如下: 解题思路:既然是要求回文字符串,那么最终的输出结果就是对称的.要变成对称字符串,只要把处于对称位置上对应的两个字符中较大的那个变成较小的那个即可,假设n=1234,1和4对称所以把4变成1 ...

  6. win 10配置安装iis

    站长喜欢本地配置iss调试网站后发布到网上,但是前提是系统得配置好iis.随着Win10的出现,越来越多的人装上了Win10, 但是小编最近发现很多旧版本windows系统用户在升级到windows ...

  7. 【HDOJ6609】Find the answer(线段树)

    题意:给定一个n个正整数的数列,第i项为w[i],对于每个i,你要从[1,i-1]中选择一些变成0,使得变化后[1,i]的总和小于m,每次询问最少要变几个 n<=2e5,m<=1e9,1& ...

  8. unicode字符集范围

    引言       unicode是全世界统一的编码规则,但只规定了各种字符的数字编码(官网:www.unicode.org),具体实现的存储方式有utff-8,utf-16,utf-32等形式,各种形 ...

  9. Centos7.4 配置之MySQL 8.0【转】

    首先查看Mysql最新版本, 此时,目前最新版本为8.0. 开始安装前需要一些准备工作. 1,将本地的MariaDB或者已经安装的MySQL其他版本卸载. (一)卸载本地的本地的MariaDB: 由于 ...

  10. Ubuntu编译ruby

    要用sass,需要ruby2.0以上版本 ubuntu升级ruby到2.1 1.安装前更新: sudo apt-get -y update sudo apt-get install cmake sud ...