To reset textbox value in JavaScript, we set the value
property to an empty string.
For instance, we write
document.getElementById("searchField").value = "";
to select the input with getElementById
.
Then we set its value
property to an empty string.
Conclusion
To reset textbox value in JavaScript, we set the value
property to an empty string.