Javascript examples for jQuery:Form Input
Using jQuery files[].size function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script type="text/javascript"> window.onload=function(){/* w ww. ja va 2s. co m*/ $(function() { $('#fileUpload').bind('change', function() { console.log(this.files[0].size); }); }) } </script> </head> <body> <input type="file" id="fileUpload"> </body> </html>