参考了<input type="file" name="file">
<input type="button" value="清除file里的内容" onclick="file.select();document
.selection.clear();">
转载于:https://www.cnblogs.com/Demcia/p/3998232.html
本文介绍了一种在网页中清除文件输入框内容的方法,通过使用JavaScript实现选择并清除已上传文件的功能,适用于需要频繁更改文件上传状态的场景。
参考了<input type="file" name="file">
<input type="button" value="清除file里的内容" onclick="file.select();document
.selection.clear();">
转载于:https://www.cnblogs.com/Demcia/p/3998232.html

被折叠的 条评论
为什么被折叠?