I am making a simple Form the problem i am facing is when i submit the form values still remains in the field. and I want to clear it after SUCCESSFUL submission. Please hel
Put the onClick function in the button submit:
In the , define the function clearform(), and set the textbox value to "":
function clearform()
{
document.getElementById("firstname").value=""; //don't forget to set the textbox id
document.getElementById("lastname").value="";
}
This way the textbox will be cleared when you click the submit button.