How to Submit a Form Using jQuery

  2361 views   2 years ago jQuery

Use the jQuery submit() Method

You can use the submit() method to submit an HTML form (i.e. <form>) using jQuery.

The jQuery code in the following example will submit the form on click of the button (i.e. the <button> element) which has the type attribute set to button (i.e. type="button").

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>jQuery Form Submit</title>
<script src=""></script>
        $("#myForm").submit(); // Submit the form
    <form action="action.php" method="post" id="myForm">
        <label>First Name:</label>
        <input type="text" name="first-name">
        <button type="button" id="submitBtn">Submit Form</button>


Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]