Onclick- it is a mouse event and occurs when the user clicks the left button of the mouse.

Onsubmit- it is a form event and occurs when a user is trying to submit the form. When form validation is used, then this is considered.

BY Best Interview Question ON 07 Jul 2019

Example

$("p").click(function(){
     alert("You clicked here");
});

$("form").submit(function(){
    alert("You form submitted");
});