how to prevent ajax post from resetting form in main page code example Example: how to reset form after submit using jquery and ajax $("#cform")[0].reset();