jQuery submit() Method - CodingTag

jQuery submit()

0 838

  • This function in jQuery is used to trigger the submit event or it binds a function to run when a submit event occurs.
  • A submit event happens when an HTML form is submitted. So, this function is only made for HTML <form> element.

Related Topics:

jQuery select
jQuery change

jQuery submit


$(selector).submit() ;


If you want to trigger a function in it, the syntax will be:


Parameter description:

  • function: It represents the function to run when the submit event is triggered. It is optional.


<title> jQuery Example </title>
<script type = "text/javascript"
var val=$(".name").val();
alert("Name submitted sccessfully and the value is : "+val);


<h2> jQuery Submit Event Example </h2>
<form class="f" method="post" action="">
Name: <input class="name" type="text" name="fullname">
<button type="submit" id="bt">Submit</button>


When you enter a name and submit,

Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments