初中作文书香伴我成长:求用java编写的显示时间与日期走马灯的源代码!必将厚谢!

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/03 10:17:32
求用java编写的显示时间与日期走马灯的源代码!必将厚谢!

显示时间:
<script language=javascript>
todayDate=new Date
date=todayDate.getDate()
month=todayDate.getMonth()+1
year=todayDate.getYear()
document.write("今天是")
document.write(" ")
document.write(year)
document.write("年")
document.write(month)
document.write("月")
document.write(date)
document.write("日")
document.write(" ")
if (todayDate.getDay()==0) document.write("星期日")
if (todayDate.getDay()==1) document.write("星期一")
if (todayDate.getDay()==2) document.write("星期二")
if (todayDate.getDay()==3) document.write("星期三")
if (todayDate.getDay()==4) document.write("星期四")
if (todayDate.getDay()==5) document.write("星期五")
if (todayDate.getDay()==6) document.write("星期六")
</script>
至于走马灯有好几种我不知道你需要的哪一种!