Course Recommendation:
Input Button multiple Attribute
Definition and Usage
multiple
The attribute sets or returns whether users can select multiple files using the file upload button. true
When set to
This attribute reflects the HTML multiple attribute.
Tip:To select multiple files, hold down the CTRL or SHIFT key while selecting.
See also:
HTML Reference Manual:HTML <input> multiple Attribute
Example
Example 1
Determine whether users can use the file upload button to select multiple files:
var x = document.getElementById("myFile").multiple;
Example 2
Allow users to select multiple files:
document.getElementById("myEmail").multiple = true;
Syntax
Return the multiple attribute:
fileuploadObject.multiple
Set the multiple attribute:
fileuploadObject.multiple = true|false
attribute value
value | description |
---|---|
true|false |
Specifies whether multiple files can be selected using the file upload button
|
Technical Details
Return Value: | Boolean value, returned if it is possible to select multiple files using the file upload button true ; otherwise return false |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |