标签:style blog io color ar java sp div on
<script language=Javascript> function time(){ //获得显示时间的div t_div = document.getElementById(‘showtime‘); var now=new Date() t_div.innerHTML = "现在是"+now.getFullYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日"+now.getHours()+"时"+now.getMinutes()+"分"+now.getSeconds()+"秒"; //等待一秒钟后调用time方法,由于settimeout在time方法内,所以可以无限调用 setTimeout(time,1000); } </script>
标签:style blog io color ar java sp div on
原文地址:http://www.cnblogs.com/xinlinux/p/4064477.html