js create function to clear input field and call it code example
Example: js clear text in input
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">