经过一个夜的奋斗,找到最好用,最简单清除file文本中的value值。
例:
<input name="picPathListLocal" type="file" contentEditable="false" tabindex="78" size="50%" class="textfield1"> <input type="button" name="btnResetpicPathListLocal" size="10%" value="重置" οnclick="picPathListLocal.select();document.execCommand('Delete');" class="button1">
上面方法可以清除,但是不建议使用,换为οnclick="document.forms[0].picPathListLocal.outerHTML=document.forms[0].picPathListLocal.outerHTML;" 也可以达到效果。