clear text field after submit javascript code example
Example 1: javascript clear form after dubmit
//Get form by Id
var form = document.getElementById("MusicForm");
form.target.reset();
Example 2: js clear text in input
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">