how to reset (clear) file input
问题 how can I reset file input in IE, I used the following and it worked in chrome and FF but not IE fileInputElement.value="" what's the alternative in IE ? 回答1: If fileInputElement is on its own in the form fileInputForm , you can do: window.fileInputForm.reset(); Otherwise for IE you'll have to replace the element with a clone: fileInputElement.parentNode.replaceChild( fileInputElement.cloneNode(true), fileInputElement ); 回答2: SOLUTION The following code worked for me with jQuery. It works in