JS code
Find information on your own online and test file upload size limit An example, compatible Ie6,ie7,ie8 ,google chrome,ff and other browsers, IE8 above the security settings at the set up a bit better (tools => Internet Options => Security => Internet => Custom Level Find "include local directory path when uploading files to server", set to Enabled).
JS Code function filechange (target,id) { var fileSize = 0; if (Isie && !target.files) { var filePath = target.value; var fileSystem = new ActiveXObject ("Scripting.FileSystemObject"); if (!filesystem.fileexists (FilePath)) { &nBsp; alert ("Attachment does not exist, please re-enter it.") "); var file=document.getelementbyid (ID); file.outerHTML=file.outerHTML; return; } var file = filesystem.getfile (FilePath); filesize = file. size; } else { filesize = target.files[0].size; } var size = fileSize / 1024; if (size>100000) { alert ("attachment size cannot be greater than 100M.) "); var File=document.getelementbyid (ID); file.outerHTML=file.outerHTML } &nbsP; if (size<=0) { Alert ("Attachment size cannot be 0M.) "); var file= document.getElementById (ID); file.outerHTML=file.outerHTML } }