<html>
<head>
<title>Latihan Js-2</title>
<style>
body {
background-color :black;
color :magenta;
font-family :"monotype corsiva";
font-size :14 px;
margin :50px 50px 50px 50px;
}
</style>
</head>
<body>
<script>
var a,b,c,d,e;
b=10;
c=15;
a=b+c;
d=a*a-b*b+c;
e=b/2*(c-d);
document.write("Nilai A =",a);
document.write("<br> Nilai D =",d);
document.write("<br> Nilai E =",e);
document.write("<hr>");
document.write("Belajar Test Kondisi");
var ip;
ip=2.5;
if (ip >3)
document.write("<br>Anda Lulus");
else
document.write("<br>Anda Tidak Lulus");
document.write("<hr>");
document.write("<br>Belajar Perulangan");
var i;
for (i=1;i<=30;i++)
{
if (i % 2 == 0)
document.write("<marquee direction=left>Yes</marquee>");
else
document.write("<marquee direction=right>No</marquee>");
}
</script>
</body>
</html>
Tidak ada komentar:
Posting Komentar