how empty onclick in dom code example Example: js remove value input document.getElementById("YourID").value = '';