實時走動的時間_JS特效源碼

最新實時走動的時間_JS特效源碼html

如下是三零網爲你們整理的最新實時走動的時間_JS特效源碼的文章,但願你們可以喜歡!ide


第一步:把以下代碼加入<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()"


轉載來自:http://www.q3060.com/list3/list115/318.html

相關文章
相關標籤/搜索