clear input javascript code example
Example 1: js remove value input
document.getElementById("YourID").value = '';
Example 2: js clear text in input
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">
document.getElementById("YourID").value = '';
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">