Javascript examples for DOM HTML Element:Input Date
Input Date defaultValue Property - Get the default value 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 ww.j a v a2 s .co m*/ var x = document.getElementById("myDate").defaultValue; document.getElementById("demo").innerHTML = x; } </script> </body> </html>