Should the following code work to reset AND refresh a form after it has been submitted? I have a reset button on the form also that works fine if incorrect information is entered, however I would also like to reset and clear the form as well after the form has been submitted. I am still seeing the information on the form after the submit using this code.
onsubmit="setTimeout(function () { window.location.reload(); }, 10)"
Here is my current HTML:
<div class="c1">
<input name="Submit" type="submit" class="style2" value="Submit" onsubmit="setTimeout(function () { window.location.reload(); }, 10)" />
<input name="Reset" type="reset" class="style2" value="Reset" onclick="clearform();"/>
</div>
Aucun commentaire:
Enregistrer un commentaire