<script>var nowTime = new Date();function _$(e){return document.getElementById(e);}function topTimeFunc(){_$("topNowDate").innerHTML = nowTime.getFullYear()+"/"+eval("nowTime.getMonth()+1")+"/"+nowTime.getDate();_$("topNowTime").innerHTML = nowTime.getHours()+":"+nowTime.getMinutes();}setInterval("topTimeFunc()",1000);</script>我想做一个在网页上自动刷新时间的代码,于是用了setInterval,但是没反应啊?这是为什么?
添加回答
举报
0/150
提交
取消