Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Email multiple property

Input Email multiple property

Input Email Object Reference Input Email Object

Example

Check whether the email field can accept multiple values:

var

x = document.getElementById(

"myEmail"

).multiple;

x The output result is:

true

Try it »


Definition and usage

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

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

This property reflects the HTML multiple attribute.

Tip: When submitting the form, separate multiple email addresses with commas, e.g.: mail@example.com, mail2@example.com, mail3@example.com.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the multiple property.

Note: Internet Explorer 9 and earlier IE versions, as well as the Safari browser, do not support .


Syntax

Return the multiple property:

emailObject

.multiple

Set the multiple property:

emailObject

.multiple=true|false

Attribute values

Value Description
true|false Specify whether the email field in the form 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: 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

    ;

    Try it »


    Related pages

    HTML Reference Manual: HTML multiple property


    Input Email Object Reference Input Email Object