Prev Demo
Returning The Day (Number) Of A Week By Using Javascript Getday() Method
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <h1>Returning the day of a week.</h1> <p>Click the below button to day of a week.</p> <input type="button" value="Get Day" onclick="myDate()" /> <p id="myId"></p> <script> function myDate() { var a = new Date(); var r = a.getDay(); document.getElementById("myId").innerHTML = r; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output