Home > Article > Web Front-end > How jQuery counts the size of uploaded files_jquery
The example in this article describes how jQuery counts the size of uploaded files. Share it with everyone for your reference. The details are as follows:
For modern browsers (supporting html5), counting the size of uploaded files on the client can be achieved through $(selector)[0].files[0].size. However, in older versions of IE browsers, such as IE7, IE8 or IE9, this approach is not supported, but it can be achieved with the help of ActiveXObject objects.
To enable ActiveXObject in IE, proceed as follows:
→Tools
→Internet Options
→Safety
→Custom level, enable ActiveXObject
I hope this article will be helpful to everyone’s jQuery programming.