写了一段脚本程序,运行时出现错误,大家帮忙看一下!
rulan 2002-08-05 02:23:55 显示各个时段的问侯语,程序如下:
<script language="javascript">
<--
mydate=new date();
myyear=mydate.getyear();
if(myyear<300) myyear=myyear-100+2000;
mymonth=mydate.getmonth()+1;
today=mydate.getdate();
myhour=mydate.gethour();
if (myhour<6)
welcomestring="凌晨好";
else if (myhour<9)
welcomestring="早上好";
else if (myhour<12)
welcomestring="上午好";
else if (myhour<14)
welcomestring="中午好";
else if (myhour<17)
welcomestring="下午好";
else if (myhour<19)
welcomestring="傍晚好";
else if (myhour<22)
welcomestring="晚上好";
else welcomestring="夜里好";
-->
</script>