1//è®¾ç½®é¡µé¢æ¶é´è·åé»è¾ @Junchen Yi 2023-9-17 2 3// è·åå ·æclass="settingTime"çå ç´ 4const settingTimeElement = document.querySelector('.settingTime'); 5 6// æ´æ°æ¶é´å½æ° 7function updateTime() { 8 const now = new Date(); 9 const hours = now.getHours(); 10 const minutes = now.getMinutes().toString().padStart(2, '0'); // è¡¥é¶ 11 const seconds = now.getSeconds().toString().padStart(2, '0'); // è¡¥é¶ 12 13 let timeOfDay = ''; 14 15 if (hours < 12) { 16 timeOfDay = 'ä¸å'; 17 } else if (hours < 18) { 18 timeOfDay = 'ä¸å'; 19 } else { 20 timeOfDay = 'æä¸'; 21 } 22 23 // å°æ¶é´æ³¨å ¥å°HTMLå ç´ å 24 settingTimeElement.textContent = `${timeOfDay} ${hours}:${minutes}:${seconds}`; 25} 26 27// åå§å è½½æ¶æ´æ°æ¶é´ 28updateTime(); 29 30// æ¯ç§éæ´æ°ä¸æ¬¡æ¶é´ 31setInterval(updateTime, 1000);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.