JavaScript实现简单的时钟
[html]<html><head><title>JS实现简单的时钟</title><script>function displayTime() {document.getElementById("time").innerHTML = new Date().toTimeString();}setInterval(displayTime,1000); // 每隔1秒钟调用displayTime函数</script></head><body><p id="time"></p></body></html>
补充:web前端 , JavaScript ,