javascript - How to Reset Values of a Form AFTER they are submitted. -
i have form1 , submit button goes like:
<input type="submit" name="submit2" id="submit2" value="insert" onclick="document.form1.reset();"/>
i want reset values of form after values submitted. above code resets them , submits (empty) values.
i have tried: onclick="document.form1.submit();document.form1.reset();" didnt work.
append following form's tag:
onsubmit="this.submit(); this.reset(); return false;"
Comments
Post a Comment