Javascript examples for DOM HTML Element:Input Datetime Local
The type property returns the type of form local datetime field.
A String, representing the type of form element the local datetime field is
The following code shows how to return which type of form element the local datetime field is:
<!DOCTYPE html> <html> <body> <input type="datetime-local" id="myLocalDate"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww . ja v a 2s.c o m*/ var x = document.getElementById("myLocalDate").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>