Javascript examples for DOM HTML Element:Input Datetime
Input Datetime readOnly Property - Find out if a datetime field is read-only or not:
<!DOCTYPE html> <html> <body> Birthday: <input type="datetime" id="myDatetime" readonly> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . j ava 2s. c o m*/ var x = document.getElementById("myDatetime").readOnly; document.getElementById("demo").innerHTML = x; } </script> </body> </html>