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

Upgrade php version of xampp not success -

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

Change font size on axis for excel chart with powershell -