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
Post a Comment