I have been trying to clear my registration form after successful registration so that it can return the same form empty without reloading the entire page. please am workiing with ajax and still new to it
Asked
Active
Viewed 101 times
0
-
1http://stackoverflow.com/questions/10633605/clear-form-values-after-submission-ajax – Pbk1303 Feb 25 '16 at 14:20
1 Answers
1
jQuery:
$("#formID")[0].reset();
or in javasscript
document.getElementById("formID").reset();
you could reset the values of the form as long as you use it within success()
or complete()
callback function

Pbk1303
- 3,702
- 2
- 32
- 47
-
-
Good. Do accept the answer (click the check mark) so that the question does not add to the unanswered list. :) – Pbk1303 Feb 28 '16 at 18:39