In this tutorial, learn how to submit form using jQuery post data without page refresh. Get form data without page refresh and use jQuery to submit the form. jQuery form submit requires jQuery submit() to submit the form on click of the button.

You can also get the values of the user input data in the alert without a page refresh using jQuery. Style the form using little bit CSS as you can see in the example. Get all the user input data in the alert box or in the div element to show the data in the frontend after form submission.

Submit Form Using jQuery Post Data Without Page Refresh

The example contains the style, jQuery and HTML form tag to include the form. You can use the jQuery click event to submit form using jQuery on click of the button. Use the alert function to get the user input data in the alert message box.

Example to create submit form using jQuery

Output






The above example contains the form with two input fields and a button for form submission. I am using atrributetype="text" for both the input. However, you can use email type for email input text box.

Fill the form given above and click the submit button. The jQuery submit() first submit the form and after that, it gets the user input data using the jQuery val(). You can see the entered data by the user in the alert message box.
You may also like.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.