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 ...
随机推荐
- HTML5 — 地理定位
Geolocation:地理定位,获取当前浏览器所在的地理坐标信息(包括经度.纬度.海拔高度.移动速度),实现LBS应用(Location Based Service)——基于定位的服务,如订 餐 ...
- JSAP101
JSAP101 1.DOM 1)文档对象模型 文档:把一个Html文件看成一个文档,所以把这个文档看成一个对象.XML文件也可以看成一个文件.XML侧重于存储数据,html主要以展示为主.一个页面就是 ...
- JS自学笔记01
JS自学笔记01 1.开发工具 webstorm 2.js(javascript) 是一门脚本.解释性.动态类型.基于对象的语言 含三个部分: ECMAScript标准–java基本语法 DOM(Do ...
- 微信公众号申请+新浪SAE申请
一. 新浪SAE服务申请 1. 注冊地址:http://t.cn/RqMHPto 2. 选择控制台>>云应用SAE 3. 创建新应用 4. 填写域名 5. 代码管理选择SVN 6. 创建版 ...
- Ubuntu 18 LTS netplan 网络配置
一.配置网络 1.通过netplan配置网络 #配置网络 nulige@ubuntu:/etc/netplan$ sudo apt install ifupdown nulige@ubuntu:/et ...
- 打开KVM Console的一些注意事项
今天早上跟思科CIMC里的KVM console较劲了很久,终于成功的打开了KVM console. 总结了下面的一些注意事项.如果你也遇到了KVM console打不开,那么可以尝试一下. 我不想花 ...
- bootstrap3-iframe-modal子页面在父页面显示模态框
本文灵感来自:http://www.cnblogs.com/chengxuyuanzhilu/p/5132328.html 子页面内容 //打开模态框 function openMySelectMod ...
- Java+Selenium3框架设计篇5-如何实现邮件发送测试报告
https://blog.csdn.net/u011541946/article/details/77278837 本篇继续回答网友的问题,这个主题是如何通过邮件发送测试报告.通过邮件发送测试报告,这 ...
- (原)tensorflow使用eager在mnist上训练的简单例子
转载请注明出处: https://www.cnblogs.com/darkknightzh/p/9989586.html 代码网址: https://github.com/darkknightzh/t ...
- Android 读写权限,已经授权情况下,仍然(Permission denied)
首次安装APP,获取读写权限以后, 当读取文件时候,仍然会遇见(Permission denied)错误,解决方案是杀掉APP,重新打开APP即可. 应该属于部分版本系统的bug,直到APP所有的pr ...