The type
property get the type of the month field.
type |
Yes | No | No | Yes | Yes |
var v = monthObject.type
A String type value representing the type of the month field.
The following code shows how to get the type of the month field.
<!DOCTYPE html>
<html>
<body>
<!-- ww w . j a va2 s . co m-->
<input type="month" id="myMonth">
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myMonth").type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows: