8.26.2012

Difference between onSubmit and onClick events in JavaScript

Difference between onSubmit and onClick events in JavaScript
S.No onSubmit() onClick()
1
Event Category:
onSubmit() is a form event.
Event Category:
onClick() is a mouse event.
2
When it occurs:
This event occurs when we try to submit a form.
When it occurs:
This event occurs when a user clicks mouse left button.
3
When to use:
We can put our form validation against this event type.
When to use:
We can put our validation, warning etc against this event type.

Reference: http://www.tutorialspoint.com/javascript/javascript_events.htm

2 comments:

  1. "Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.php jobs in hyderabad.
    "

    ReplyDelete
  2. • Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingAzure Online Training

    ReplyDelete