How do you clear a plain HTML form after onsubmit?
A quick and easy solution:
<form action="mailto:[email protected]"
onsubmit="this.submit(); this.reset(); return false;">
function submit_form() {
document.formu1.submit();
document.formu1.reset();
}
<form name="formu1" action="action-page" method="POST" target="_blank" />
Name: <input type="text" name="name" /><br /><br />
Pass: <input type="password" name="pass" /><br /><br />
<input type="button" value="Send" onclick="submit_form();" />
</form>