如何清除输入类型文件字段? [英] How Do I Clear The Input Type File Field?
本文介绍了如何清除输入类型文件字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用
$(' #file')。 val(' ');
但它不支持IE。有没有其他选择呢?
解决方案
(' #file')。val(' ');
但它不支持IE。有没有其他选择呢?
尝试
('#file')。attr('value', '');
I am using
$('#file').val('');
But it is not supporting in IE. Is there any alternative of doing this?
解决方案
('#file').val('');
But it is not supporting in IE. Is there any alternative of doing this?
Try
('#file').attr('value','');
这篇关于如何清除输入类型文件字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文