I have tried a lot on searching but could not find a working script for the limitation of the file size using javascript here below is my code but it is not working
if ($('#photo').get(0).files.size >1024 )
{
alert("Please select pic size less than 1 mb file .");
return false;
}
Where photo is id of input type file