We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Input.multiple Redirect 1

« Input

The HTMLInputElement.multiple property indicates if an input can have more than one value. Firefox only support multiple for <input type=file>.


// fileInput is a <input type=file multiple>
var fileInput = document.getElementById("myfileinput");

if (fileInput.multiple == true) {

    for (var i = 0, len = fileInput.files.length; i < len; i++) {
        // loop fileInput.files

// only one file available
} else {
    var file = fileInput.files.item(0);

See Also


Document Tags and Contributors

Last updated by: Sheppy,