报错This input element accepts a filename, which may only be programmatically set to the empty string

今天用js动态向页面的input输入框添加数据,遇到一个问题,就是输入框的类型不同,不能全都用赋值的方式赋上去blog 在遇到类型为file的input框赋值时会报错This input element accepts a filename, which may only be programmatically set to the empty string。因此在这里应该跳过file类型的输入框
相关文章
相关标签/搜索