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

解决办法:

把上面的代码改成如下问题就解决了

猜你喜欢

转载自www.cnblogs.com/ouguangqiang/p/9713645.html
今日推荐