js代码
<script> function displayTime() { var elt = document.getElementById("todaydatetime"); var now = new Date(); var h = now.getHours(); var m = now.getMinutes(); var s = now.getSeconds(); var ms = now.getMilliseconds(); elt.innerHTML =h + "小时:" + m + "分:" + s + "秒:" + ms; setTimeout(displayTime, 100); } displayTime(); </script>
在线预览
资源均来自第三方,谨慎下载,前往第三方网站下载