这个。。。
1 回答
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window对象</title>
</head>
<body>
<p id="p1"></p>
<script type="text/javascript">
function showTimes(){
var b=new Date();
var p1 = document.getElementById("p1");
p1.innerHTML = "现在时间是:"+b.getFullYear()+"年"+b.getMonth()+"月"+b.getDate()+"日"+b.getHours()+"时"+b.getMinutes()+"分"+b.getSeconds()+"秒"+"<br>";
}
setInterval(showTimes, 1000);
</script>
</body>
</html>举报
0/150
提交
取消