第一步:把以下代碼加入<body>區域中 <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function clock() { var date = new Date() var year = date.getYear() var month = date.getMonth() var day = date.getDate() var hour = date.getHours() var minute = date.getMinutes() var second = date.getSeconds() var months = new Array("", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC")spa var monthname = months[month]orm if (hour > 12) { hour = hour - 12 }htm if (minute < 10) { minute = "0" + minute }ip if (second < 10) { second = "0" + second }ci document.title = "如今是: " + monthname + " " + day + ", " + year + " - " + hour + ":" + minute + ":" + secondget
setTimeout("clock()", 1000)源碼 } // End --> </script>it 第二步:修改<body***>中的內容,將下面的代碼加入原<body***>中 onLoad="clock()"
|