Berikut kode untuk menampilkan jam dan tanggal:
<script type="text/javascript">
var dayarray = new Array("Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu");
var montharray = new Array("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember");
var kursusblog = new Date();
var day = kursusblog.getDay();
var month = kursusblog.getMonth();
var daym = kursusblog.getDate();
var year = kursusblog.getFullYear();
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (minutes < 10)
minutes = "0" + minutes
if (daym < 10)
daym = "0" + daym;
document.write("<b>Hari</b>" + " " + dayarray[day] + ", " + daym + " " + montharray[month] + " " + year);
document.write("<br/>");
document.write("<b>Pukul</b>" + " " + hours + "<blink>:</blink>" + minutes);
</script>
Catatan : Anda bisa mengganti tulisan yang diberi warna merah.
Silahkan copy paste kode tersebut diatas dan aplikasikan di page elemen blog anda.
TERIMA KASIH ATAS KUNJUNGAN ANDA
2 komentar:
kalo jam menurut GMT gimana gan?
terimakasih atas infonya gan, good luck
Posting Komentar