Input Email multiple Attribute
Definition and Usage
multiple
Attribute settings or returns whether the email field should accept multiple values/email addresses when submitting the form.
When set to true, it specifies that multiple values/email addresses are allowed to be entered in the email field.
This attribute reflects the HTML multiple attribute.
Tip:When submitting, separate each email address with a comma, for example: email@example.com, mail2@example.com, mail3@example.com in the email field.
See also:
HTML Reference Manual:HTML <input> multiple Attribute
Example
Example 1
Check if the email field accepts multiple values/email addresses:
var x = document.getElementById("myEmail").multiple;
Example 2
Set the email field to allow multiple email addresses:
document.getElementById("myEmail").multiple = true;
Syntax
Return the multiple attribute:
emailObject.multiple
Set the multiple attribute:
emailObject.multiple = true|false
Attribute value
Value | Description |
---|---|
true|false |
Specify whether the email field should accept multiple email addresses when submitting the form.
|
Technical Details
Return Value: | Boolean value, returned if the email field accepts multiple emails true ; otherwise return false . |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |