Prev Demo
Returning The Day From The Specified Date By Using Getdate() Method In Javascript.
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <h1>Returning the specified date from date method.</h1> <p>Click the below button to get specified Date.</p> <input type="button" value="Get Date" onclick="myDate()" /> <p id="myId"></p> <script> function myDate() { var a = new Date("August 15, 1947 00:25:33"); var r = a.getDate(); document.getElementById("myId").innerHTML = r; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output