執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>JavaScript Dates</h2> <p>setUTCMonth() method sets the month (according to UTC time) of a date object:</p> <p id="demo"></p> <p><b>Note:</b> 0=January, 1=February etc.</p> <script> const d = new Date(); d.setUTCMonth(4); document.getElementById("demo").innerHTML = d; </script> </body> </html>