Input Email multipleProperty

Input Email 对象参考手册Input Email Object

Example

Check if the email field can accept multiple values:

var x = document.getElementById("myEmail").multiple;

xThe output result is:

true

Try it yourself »


Definition and Usage

The multiple property is used to set or return whether the email field in a form can accept multiple values (email addresses).

When set to true, it indicates that the user is allowed to enter multiple values in the email field.

This property reflects the HTML multiple attribute.

Tip:When submitting the form, use commas to separate multiple email addresses, such as: mail@example.com, mail2@example.com, mail3@example.com.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the multiple attribute.

Note:Internet Explorer 9 and earlier IE versions, and Safari browser do not support the <input type="email"> element.


Syntax

Return the multiple property:

emailObject.multiple

Set the multiple property:

emailObject.multiple=true|false

Property Values

Value Description
true|false In the form, specifies whether the email field can accept multiple email addresses submission
  • true - The email field can accept multiple email addresses
  • false - Default. The email field cannot accept multiple email addresses

Technical Details

Return Value: A Boolean value, returns true if the email field allows entering multiple values, otherwise returns false.


More Examples

Example

Set the email field to allow entering multiple email addresses:

document.getElementById("myEmail").multiple = true;

Try it yourself »


Related Pages

HTML Reference Manual:HTML <input> multiple attribute


Input Email 对象参考手册Input Email Object

Other Extensions