ITeye博客

EXT 清空 inputType : 'file'

resp · 2012-08-23 14:10 · Extjs · Web前端 · Markdown

对于 inputType : 'file', 的 field 在使用 form.reset()的时候 不能将文本框的路径给清除掉,可以用如下方法來清空:

var obj = document.getElementById("fileuploadfieldid");       
          obj.outerHTML = obj.outerHTML;

 同時,不能用Ext.getCmp('fileuploadfieldid').getValue()來取值,不然還會取到原先選擇的文件的路徑,

需要用document.getElementById("fileuploadfieldid").value來取值。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。