Prev Demo
JavaScript
>
Getutcday() Method
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to display the day of the week as per the UTC.</p> <input type="button" value="Click" onclick="myDate()" /> <p id="myId"></p> <script> function myDate() { var A = new Date(); var R = A.getUTCDay(); document.getElementById("myId").innerHTML = R; } </script> <br/> <p><strong>Note:</strong> In this case<br/> 0=Sunday<br/>1=Monday<br/>.<br/>.<br/>.<br/>.<br/>6=Saturday.</p> </body> </html>
Note: We DO NOT save your trial code in our database.
Output