Javascript examples for DOM HTML Element:Input Datetime Local
Input DatetimeLocal readOnly Property - check if a local datetime field is read-only or not:
<!DOCTYPE html> <html> <body> <input type="datetime-local" id="myLocalDate" readonly> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w w w . j a v a 2 s . c om var x = document.getElementById("myLocalDate").readOnly; document.getElementById("demo").innerHTML = x; } </script> </body> </html>