function showCurrentTime() {
const CurrentTime = new Date();
document.getElementById('time').innerHTML = CurrentTime.toLocaleString();
}
window.onload = showCurrentTime(); // 页面加载完毕后执行
setInterval(showCurrentTime, 1000);