<html>
<head></head>
<script language="JavaScript" type="text/javascript">
setInterval(show,1000);
function show(){
datetime = "当前本地时间为: ";
var d=new Date();
datetime += d.getHours() + ":";
datetime += d.getMinutes() +":";
var minu = d.getSeconds();
if(minu<10){
datetime += "0"+minu;
}else{
datetime +=minu;
}
document.getElementByIdx_x("date").innerHTML=datetime;
}
</script>
<body>
<p id="date"></p>
<body>
</html>
时间: 2024-10-10 04:19:07