<html>
<head>
<title>计时器<title/>
<script type="text/javascript">
var jt = serInterval("jishi();",1000);
function jishi()
{
var date = new Date();//获取时间对象
var year,month,day;//定义年月日
var hour,minute,second;//定义时分秒
var week =["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];
year = date.getFullYear();
month= date.getMonth()+1;
day = date.getDate();
hour= date.getHours();
minute = date.getMinutes();
second = date.getSeconds();
var currentTime = week[date.getDay()]+" "+year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second;
document.getElementById("time").innerHTML="当前时间:"+currentTime;
}</script>
</head>
<body>
<div id="time"></div>
</body>
</html>
2025 - 快车库 - 我的知识库 重庆启连科技有限公司 渝ICP备16002641号-10
企客连连 表单助手 企服开发 榜单123