Uncaught InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
使用 HTML5 的图片上传api的时候报如下错误:
Uncaught InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
出现这个bug的原因是,input元素 blur的时候,需要将上次图片的input元素的value设置为空字符串,就不会报错了。
http://stackoverflow.com/questions/29720794/jquery-select-input-file-and-also-set-it-to-another-input
Uncaught InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.的更多相关文章
- Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
今天上传图片遇到这个报错 百度了下,网上说是input标签type=file所以导致的问题,可是我的type=hidden 解决办法: 把上面的代码改成如下问题就解决了
- select2取值报错,Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('hidden') does not support selection.
用到了 select2 组件来多选收件人,用搜狗浏览器(6.2版高速模式)在执行到如下这句时报错(Uncaught InvalidStateError: Failed to read the 'sel ...
- angularjs Failed to read the 'selectionStart' property from 'HTMLInputElement':
在找angularjs input(type='number')在获取焦点的时候,文本框内容选中效果,参考了:Select text on input focus,我直接复制他的code之后,在ion ...
- angularjs 1 Failed to read the 'selectionStart' property from 'HTMLInputElement':
在找angularjs input(type='number')在获取焦点的时候,文本框内容选中效果,参考了:Select text on input focus,我直接复制他的code之后,在ion ...
- vue引入fastclick设置输入框type="number"报错Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.的解决办法
将输入框type设为text,通过正则验证输入的值
- Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
canvas绘制图片,由于浏览器的安全考虑,如果在使用canvas绘图的过程中,使用到了外域的图片资源,那么在toDataURL()时会抛出安全异常: Uncaught SecurityError: ...
- Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' ...
- Uncaught DOMException: Failed to construct 'WebSocket': The URL 'xxx.xxx.com/' is invalid.
Uncaught DOMException: Failed to construct 'WebSocket': The URL 'xxx.xxx.com/' is invalid. 出现这个问题是构造 ...
- wordpress 点击文章图片 不能编辑(chrome下面) wordpress Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1.
说明:在chrome下面,编辑文章插入的图片,点击到图片上面,没有菜单显示. 报错: tinymce.min.js:10 Uncaught DOMException: Failed to execut ...
随机推荐
- yii2 数据提供者 dataProvider
数据提供者 dataProvider $dataProvider = new ActiveDataProvider([ 'query' => $query, // 如何来取得数据 'pagina ...
- xml 初步学习 读取
引入xml文件 function loadXMLDoc(dname) { if (window.XMLHttpRequest) { xhttp = new ...
- C#自动识别文件编码
以下代码源自:http://www.cnblogs.com/stulzq/p/6116627.html /// <summary> /// 用于取得一个文本文件的编码方式(Encoding ...
- db2 reorg runstats rebind具体操作
db2 reorg runstats rebind具体操作 #reorg table db2 -x "select 'reorg table '||rtrim(tabschema)||'.' ...
- SDN+DPI文献阅读
MultiClassifier: A combination of DPI and ML for application-layer classification in SDN 来源:Internat ...
- Win 10 System Restore Fail 0x80070091
Question: Below about says it all. I tried SysRes from two points, both with same failure. System R ...
- bat获取文件夹里面所有文件夹的名称方法
创建一个123.txt文档,修改名称为123.bat 里面填写内容如下: DIR *.* /B >文件名清单.TXT 保存,双击执行即可获取生成文件夹名称的txt文档
- 海康威视(iOS集成)
一.注意事项 1.在开发海康威视的SimpleDemo时,最好使用真机,因为海康提供的5个库不支持模拟的i386架构. 2.在XCode9.3版本上运行SimpleDemo时,对.mm文件进行编辑时, ...
- DES加密解密算法C语言代码实现
代码: #include<stdio.h> #include<string.h> #include<stdlib.h> /*-------------------- ...
- Mosquitto --topic
订阅树的概念 Mosquitto通过订阅树的方式来管理所有的topic以及客户端的订阅关系,它首先将所有的topic按照/分割并组织成一棵树结构,从根节点到树中的每个节点即组成该节点所对 ...