Caranya seperti dibawah ini :
1. Copy kode berikut dan paste dibawahnya --> <head>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function clock() {
var title="JavaScriptSource The home of free scripts!";
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")
var monthname=months[month];
if (hour > 12) {
hour=hour- 12;
}
if (minute < 10) {
minute="0"+minute;
}
if (second < 10) {
second="0"+second;
}
document.title=title+" - "+monthname+" "+day+", "+year+" -
"+hour+":"+minute+":"+second;
setTimeout("clock()", 1000)
}
</script>
2. Letakkan kode script dibawah dan paste dibawahnya --> <body> tag
<BODY onLoad="clock()">
Tidak ada komentar:
Posting Komentar