-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
清空 input[type="file"] 的值 #29
Comments
直接 |
@chbro 近期我也有操作上传文件一直想清空😊。试了你的方案成功清空。👍 |
@xmcp 可以直接设置为空('' | null) (chrome 69 firefox 62 edge17) |
直接 考虑兼容性,也可以这样 <form id="uploadField">
<input type="file" />
</form> window.uploadField.reset() 但是要注意 form 不能嵌套 form,最好 Portal 到其他地方 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: