The multiple
property sets or gets whether an email field can
accept multiple emails on form submission.
multiple |
Yes | 10.0 | Yes | Yes | Yes |
Return the multiple property.
var v = emailObject.multiple
Set the multiple property.
var v = emailObject.multiple=true|false
Value | Description |
---|---|
true|false | Set whether an email field should accept multiple emails on form submission
|
A Boolean type value, true if the email field accept multiple emails, otherwise false.
The following code shows how to set an email field to allow multiple emails.
<!DOCTYPE html>
<html>
<body>
<!--from w w w .j av a2s . c o m-->
<form action="url">
E-mail: <input type="email" id="myEmail" name="usremail">
<input type="submit">
</form>
<button onclick="myFunction()">test</button>
<script>
function myFunction() {
document.getElementById("myEmail").multiple = true;
}
</script>
</body>
</html>
The code above is rendered as follows:
The following code shows how to get if an email field accept multiple emails.
<!DOCTYPE html>
<html>
<body>
<!--from w ww . j a v a 2s. c o m-->
<form action="url">
E-mail: <input type="email" id="myEmail" name="usremail" multiple>
<input type="submit">
</form>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myEmail").multiple;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows: