sintak java script..........>>>
memunculkan gambar seperti dibwah ini>>
sintaknya sebagai berikut,,,,,,,,
<html>
<head><title>No. 4</title>
</head>
<body>
<script type = "text/javascript">
var n = 10;
var i = 2;
var j = 2;
for(i = 1; i <= n+1; i++)
{
for(j = 1; j <= n+1; j++)
{
if((i==j) || (j == n + 2 - i))
{
document.write("A");
}
else
{
document.write("=");
}
}
document.write("<br/>");
}
</script>
</body>
</html>
<head><title>No. 4</title>
</head>
<body>
<script type = "text/javascript">
var n = 10;
var i = 2;
var j = 2;
for(i = 1; i <= n+1; i++)
{
for(j = 1; j <= n+1; j++)
{
if((i==j) || (j == n + 2 - i))
{
document.write("A");
}
else
{
document.write("=");
}
}
document.write("<br/>");
}
</script>
</body>
</html>
0 komentar:
Posting Komentar