TUGAS LOOPING
CONTOH PROGRAMNYA
<html>
<head>
<title> loop2 </title>
<script>
function tampil()
{
var n, i;
n=document.getElementById("txtn").value;
for (i=1; i<=n; i++)
{
document.write(i+".fikom unika <br>");
}
}
</script>
</head>
<body>
<form>
INPUT N
<input type="TEXT" size="5" NAME="txtn" id="txtn">
<input type="BUTTON" value="PROSES" onclick="tampil()">
</form>
</body>
</html>
Tidak ada komentar:
Posting Komentar