<FORM name="form1">
方法1:<input type="file" name="f"><input type=button value=reset onclick="f.outerHTML=@#<input type=\@#file\@# name=\@#f\@#>@#">
</FORM>
<FORM name=form2>
方法2:<input type="file" name=f2>
<input type=button value=reset onclick="f2.select();document.execCommand(@#delete@#)">
</FORM>
</body>
文章来源于领测软件测试网 https://www.ltesting.net/