<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/jQuery.js"></script>
</head>
<body>
<p id="show"></p>
<script>
function setTime() {
var date = new Date();
var HH = date.getHours(),
MM = date.getMinutes(),
SS = date.getSeconds(),
date = date.getDate();
if(SS<10){
SS = "0"+SS
}
$("#show").text(HH+":"+MM+":"+SS);
}
//设置时间间隔
setInterval(setTime, 1000);
</script>
</body>
</html>
JS,jQuery制作一个动态时钟
最新推荐文章于 2020-07-27 16:08:32 发布