jQuery Tutorial


jQuery Example


jQuery References


jQuery submit() Event Reference


  jQuery Events References


Uses

jQuery submit() Event Occurs when form is submitted.


Bind a Function to submit() event

Defined function run when the submit() event occurs on the selected elements.

Syntax

$(selector).submit(function) 

jQuery submit() events supported following parameters.

ParameterDescription
functionFunction is Optional parameter. Function define the ready to run when event occur.

Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("form").submit(function(e){
    alert("Successfully Submitted");
  });
});
</script>
Online Try This Code Your Self....   »

Trigger the submit() event

Triggering the submit() event for a selected elements.

Syntax

$(selector).submit()

Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("form").submit(function(e){
    alert("Successfully Submitted");
  });
  $("button").click(function(){
    $("form").submit();
  });
});
</script>
Online Try This Code Your Self....   »

  jQuery Events References