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