yangwenxin

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>js demo1</title>
</head>
<body>
<script src="cLanguage.js"> 

var t = null;
t = setTimeout(time,1000);
function time(){
clearTimeout(t);
dt = new Date();
var h = dt.getHours();
var m = dt.getMinutes();
var s = dt.getSeconds();
document.getElementById("timeShow").innerHTML="现在的时间:" + h + "时" + m + "分" + s + "秒";
t = setTimeout(time,1000);
}

</script>
<label id="timeShow"></lable>
</body>
</html>

分类:

技术点:

相关文章:

  • 2021-12-16
  • 2022-01-01
  • 2021-11-05
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-09-21
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2021-08-30
  • 2021-11-15
  • 2021-12-22
  • 2021-11-05
相关资源
相似解决方案