Input Datetime disabled Property - Find out if a datetime field is disabled or not: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Datetime

Description

Input Datetime disabled Property - Find out if a datetime field is disabled or not:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<input type="datetime" id="myDatetime" disabled>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {/*  w ww  . j a va2  s  .  c  o  m*/
    var x = document.getElementById("myDatetime").disabled;
    document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>

Related Tutorials