image size validation using jquery

In this post we are going to see form image size validation using jQuery. image validation using file size it will happen when submitting the button press. we are using jquery validation method on form. onsubmit is form attribute to use the call jquery function.

HTML CODE:

Jquery validation goes here when file size is greater then 2MB then continues for uploading otherwise jquery validation return false.

JQuery CODE: