标签:style UNC body query new rgb ack tor bsp
<body> <div></div> <script> var div = document.querySelector(‘div‘); retNowTime(); setInterval(retNowTime, 1000); function retNowTime() { var date = new Date(); var hours = date.getHours(); hours = hours < 10 ? ‘0‘ + hours : hours; var minutes = date.getMinutes(); minutes = minutes < 10 ? ‘0‘ + minutes : minutes; var seconds = date.getSeconds(); seconds = seconds < 10 ? ‘0‘ + seconds : seconds; div.innerHTML = hours + ‘:‘ + minutes + ‘:‘ + seconds; } </script> </body>
标签:style UNC body query new rgb ack tor bsp
原文地址:https://www.cnblogs.com/WP-WangPin/p/13796448.html