Javascript examples for DOM HTML Element:Input Date
Input Date value Property - Get the date of a date field:
<!DOCTYPE html> <html> <body> <input type="date" id="myDate" value="2000-05-05"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w w w .ja va 2 s . c o m var x = document.getElementById("myDate").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html>