Search code examples
javascriptjqueryhtmlcross-browserhtml5-filesystem

How to detect browser supports this HTML5 feature


I want to detect (using javascript/jQuery) whether the user's browser supports multiple attribute to input type='file' tag. A feature of HTML5 to add multiple images.

<input type=file  name="images" value=" " multiple=""/>

Please suggest me how can i do this.


Solution

  • var i = document.createElement("input");
    if (typeof i.multiple !== 'undefined') {
        // supports multiple
    }