Input Email multiple
Attribute
Example
Check if the email field can receive multiple values:
var x = document.getElementById("myEmail").multiple;
x output result:
true
Definition and Usage
The multiple
attribute is used to set or return whether the email field in a form can receive multiple values (email addresses).
When set to true
, it allows the user to enter multiple values in the email field.
This attribute reflects the HTML multiple
attribute.
Tip: When submitting the form, multiple email addresses are separated by commas, such as: [email protected], [email protected], [email protected].
Browser Support
All major browsers support the multiple
attribute.
Note: Internet Explorer 9 and earlier versions, and Safari do not support the <input type="email">
element.
Syntax
Return the multiple
attribute:
Set the multiple
attribute:
Attribute Values
Value | Description | |
---|---|---|
true | false | Specifies whether the email field can accept multiple email addresses in the form submission<br>true - The email field can accept multiple email addresses<br>false - Default. The email field cannot accept multiple email addresses |
Technical Details
| Return Value: | Boolean, returns true
if the email field allows multiple values, otherwise returns false
. |
| --- | --- |
More Examples
Example
Set the email field to allow multiple email addresses:
document.getElementById("myEmail").multiple = true;
Related Pages
HTML Reference: HTML <input> multiple Attribute