<html>
<head>
<title>Latihan JS Lanjut</title>
</head>
<body bgcolor="teal">
<script>
var v,s,t;
var ket;
s=1000;
t=3;
v=s/t;
if (v>300)
ket="Kecepatan Extreme";
else if (v>200)
ket="Kecepatan Luar Biasa";
else if (v>100)
ket="Kecepatan Lumayan Cepat";
else
ket="Kecepatan Normal";
document.write("<br>Nilai V : ",v," km/jam");
document.write("<br>Nilai S : ",s," km");
document.write("<br>Nilai T : ",t," jam");
document.write("<br>Dengan Kecepatan : ",v," km/jam maka ",ket);
window.alert("Sukses... Selamat Belajar");
document.write("<hr>");
document.write("<table border=1 width=75% bgcolor=BLUE align=center>");
document.write("<tr><td colspan=3>Logo</td></tr>");
document.write("<tr height=300px><td width=15%>Menu</td>");
document.write("<td>Isi</td><td width=15%>news</td></tr>");
document.write("<tr><td colspan=3 align=center>Hakcipta</td></tr>");
</script>
</body>
</html>
Tidak ada komentar:
Posting Komentar