HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to display UTC month of the current date.</p> <button onclick="myFunction()">Display UTC Month</button> <p id="point"></p> <p><strong>Note</strong>: 0 = January, 11 = December</p> <script> function myFunction() { var d = new Date(); var n = d.getUTCMonth(); document.getElementById("point").innerHTML = n; } </script> </body> </html>
OUTPUT
×

Save as Private