您的位置:首页 > 产品设计 > UI/UE

Failed to set the 'value' property on 'HTMLInputElement': This input element解决办法

2017-09-28 17:07 609 查看
这没有从根本解决问题,但这是最快的方法,哪位老铁有更好的方法,请留言:

//Just to remove error inside the console.
//If error exists then onChange event is not fired.
var fileHook = {
get: function (elem) {
return this.value;
},
set: function (elem, value) {
return this.value = value;
}
}
$.valHooks["file"] = fileHook;


翻译自:https://stackoverflow.com/questions/43612763/invalidstateerror-failed-to-set-the-value-property-on-htmlinputelement

之前看到文章是因为是文件上传时文件类型导致,望参考
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  JS file文件
相关文章推荐