JavaScript How To: How to get javascript date in html input type=date value Example-1 Type Your Code <!DOCTYPE html> <html lang="en"> <head> <title>JavaScript How To : How to get javascript date in html input type=date value - progrramers</title> </head> <body> <input type="date" id="displaydate"> <input type="button" onclick="getDate()" value ="Get Date"> <script> function getDate(){ document.getElementById("displaydate").value="2019-08-20"; } </script> </body> </html> Result
0 comments: