input type file clears after submit code example Example: javascript set file input value to null document.getElementById("myInputFileID").value=null;