Give a script: <script type="text/javascript"> function getNowDate() { var date = new Date(); var year = date.getFullYear() // 年 var month = date.getMonth() + 1; // 月 var day = date.getDate(); // 日 var hour = date.getHours(); // 时 var minutes = date.getMinutes(); // 分 varseconds The = date.getSeconds () // seconds var weekArr = [ ' Sunday ' , ' Monday ' , ' Tuesday ' , ' Wednesday ' , ' Thursday ' , ' Friday ' , ' Saturday ' ]; var Week = weekArr [DATE .getDay ()]; // to the front of the data plus a number of "0" IF (month The > = . 1 && month The <= . 9 ) { month = "0" + month; } if (day >= 0 && day <= 9) { day = "0" + day; } if (hour >= 0 && hour <= 9) { hour = "0" + hour; } if (minutes >= 0 && minutes <= 9) { minutes = "0" + minutes; } if (seconds >= 0 && seconds <= 9) { seconds = "0" + seconds; } document.getElementById("info").innerHTML = year + "年" + month + "月" + day + "日" + " " + week; //return currentdate; } </script> Then find the location corresponding to the added time <div class="fl"> <span id="info"></span> </div> Finally, the page load time he began to read: <body οnlοad="getNowDate()"> Original link: https: //blog.csdn.net/copyerman115/article/details/78584715