Hello Reader's! If you are looking for an HTML 5 validation which tell user the size of an file the code will help you:-
In HTML fileL
<input type="file" id="file" />
In the JS file
//binds to onchange event of your input field
$('#file').bind('change', function() {
//this.files[0].size gets the size of your file.
alert(this.files[0].size);
});
0 Comment(s)