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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -