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

Javascript examples for DOM HTML Element:Input Datetime Local

Description

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<input type="datetime-local" id="myLocalDate" disabled>

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

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

<script>
function myFunction() {/*ww w. j  a v a2 s . c  om*/
    var x = document.getElementById("myLocalDate").disabled;
    document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>

Related Tutorials