Input Time readOnly Property - Find out if a time field is read-only - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Time

Description

Input Time readOnly Property - Find out if a time field is read-only

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Time: <input type="time" id="myTime" readonly>

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

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

<script>
function myFunction() {//from   w  ww  . ja  v a 2s.c om
    var x = document.getElementById("myTime").readOnly;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials