how to clear an input file upload field with javascript code example Example: javascript clear file input document.getElementById("myFileInputID").value = null;