The type
property returns the type of the email field.
type |
Yes | 10.0 | Yes | Yes | Yes |
var v = emailObject.type
A String type value representing the type of the email field.
The following code shows how to get the type of the email field.
<!DOCTYPE html>
<html>
<body>
<!-- w ww .j a v a 2 s.c om-->
E-mail: <input type="email" id="myEmail">
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myEmail").type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows: