js method to clear the input field code example Example: js remove value input document.getElementById("YourID").value = '';