Internet Explorer does not support the multiple attribute for <input type="file" /> . However, it is not only IE that lacks this support ... also some mobile browsers do not support the multiple attribute. Thus, simply detecting that the browser is IE is not an ideal solution.
So, how would I determine if the multiple attribute is supported for <input type="file" /> with JavaScript?
UPDATE
Modernizr seems to have support for the new attributes of the HTML5 input element:
http://modernizr.com/docs/#input
The accepted solution seems to work, however, since I am already using Modernizr, my solution is this:
function isInputAttributeSupported(attribute) { return (Modernizr.input[attribute]) ? true : false; };
Hristo
source share