how to clear a textbox in javascript code example
Example 1: clear textbox js
function name()
{
document.getElementById('elementid').value = "";
}
Example 2: js clear text in input
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">