21、标题栏显示日期

21、标题栏显示日期

<!-- 要实现此效果需要 1 个步骤: -->

 

<!-- 1 步: -->

<!-- 把下面的代码加到<BODY></BODY>区域中: -->

 

<script language="JavaScript1.2">

<!--hide

var isnMonth = new

Array("1","2","3","4","5","6","7","8","9","10","11","12");

var isnDay = new

Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");

today = new Date () ;

Year=today.getYear();

Date=today.getDate();

if (document.all)

document.title="今天是: "+Year+""+isnMonth[today.getMonth()]+Date+""+isnDay[today.getDay()]

//--hide-->

</script>

Write a comment

Comments: 0