Jumat, 20 April 2012

Objek 2 (Array) [ Aplikasi IT Part II ] pertemuan ke-4.2


<html>
<head>
<title> Contoh Objek Date </title>
</head>
<body bgcolor = "silver">
<script language = "javascript">
<!--
var hari = new Array ("Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu");
var bulan = new Array ("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus",
"September","Oktober","November","Desember");
var A = new Date();
var hari_ini = hari[A.getDay()-1];
var tanggal = A.getDate();
var bulan_ini = bulan[A.getMonth()];
var jam = A.getHours();
var menit = A.getMinutes();
document.write("<font face = calibri>");
document.write("<b><center>Sekarang hari "+ hari_ini + ", tanggal " + tanggal + " " + bulan_ini);
document.write("<hr width = 500>");
document.write("<b><center>Sekarang Jam : " + jam + ":" + menit);
document.write("</font>");
//-->
</script>
</body>
</html>

Tidak ada komentar:

Posting Komentar