javascript - How to clear file input without lose event listeners and expanded properties? -


i want clear file input in form i'm using angularjs , other jquery components , can't lose event listeners , expanded properties.

there way without removing or using jquery replacewith or clone functions?

what setting it's value property empty string?

function clearfile() {    document.getelementbyid("file").value = "";  }
<input type="file" name="" id="file" />  <input type="button" value="clear" onclick="clearfile();" />


Comments

Popular posts from this blog

amazon web services - S3 and apache mod_proxy with basic authentication -

How to install ruby on rails -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -