Example
Find out if a user can select more than one file with the file upload button:
var x = document.getElementById("myFile").multiple;
The result of x will be:
true
Try it Yourself »
Definition and Usage
The multiple property sets or returns whether more than one file can be selected with the file upload button.
When set to true, it specifies that the user is allowed to select more than one file.
This property reflects the HTML multiple attribute.
Tip: To select multiple files, hold down the CTRL or SHIFT key while selecting.
Browser Support
Property | |||||
---|---|---|---|---|---|
multiple | Yes | 10.0 | Yes | Yes | Yes |
Syntax
Return the multiple property:
fileuploadObject.multiple
Set the multiple property:
fileuploadObject.multiple=true|false
Property Values
Value | Description |
---|---|
true|false |
Specifies whether more than one file can be selected with the file
upload button
|
Technical Details
Return Value: | A Boolean, returns true if more than one file can be selected with the file upload button, otherwise it returns false |
---|
More Examples
Example
Allow the user to select multiple files:
document.getElementById("myEmail").multiple = true;
Try it Yourself »
Related Pages
HTML reference: HTML <input> multiple attribute
< Input FileUpload Object