首页 > Web开发 > 详细

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.

时间:2016-01-18 20:29:17      阅读:4318      评论:0      收藏:0      [点我收藏+]

使用 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.

原文:http://www.cnblogs.com/ayseeing/p/5140310.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!