[求助]怎么显示javascript函数?
以下是一个时间函数代码,可是浏览的时候页面上什么也没有,该怎么修改呢?<script language="javascript">
<!--
function showtiome(){
var now=new.Date();
var year=now.getYear();
var month=now.getMonth();
var date=now.getDate();
var day=now.getDay();
var hour=now.getHours();
var minu=now.getMinutes();
var sec=now.getSeconds();
var week;
month=month+1;
if(month<10) month="0"+month;
if(date<10) date="0"+date;
if(hour<10) hour="0"+hour;
if(minu<10) minu="0"+minu;
if(sec<10) sec="0"+sec;
switch(day){
case 1:
week="星期一";
break;
case 2:
week="星期二";
break;
case 3:
week="星期三";
break;
case 4:
week="星期四";
break;
case 5:
week="星期五";
break;
case 6:
week="星期六";
break;
default 7:
week="星期七";
break;
}
var time="";
time=year+"年"+month+"月"+date+"日"+hour+"时"+minu+"分"+sec+"秒";
setTimeout("showtime()",1000);
showtime();
}
-->
</script>