<html>
<head>
<title>Program Hari</title>
</head>
<body>
<script language = "JavaScript">
<!--
var Hari = new Array();
angka = parseInt(prompt("Masukan Angka 1-7 =\n"));
Hari[0] = "Senin";
Hari[1] = "Selasa";
Hari[2] = "Rabu";
Hari[3] = "Kamis";
Hari[4] = "Jumat";
Hari[5] = "Sabtu";
Hari[6] = "Minggu";
if ( angka==1)
document.write(Hari[0]);
if ( angka==2)
document.write(Hari[1]);
if ( angka==3)
document.write(Hari[2]);
if ( angka==4)
document.write(Hari[3]);
if ( angka==5)
document.write(Hari[4]);
if ( angka==6)
document.write(Hari[5]);
if ( angka==7)
document.write(Hari[6]);
//-->
</script>
</body>
<html>
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar