Displaying Stars using Javascript.....
HTML Code:
7)
<html>
<head><title>Display stars</title>
</head>
<body background="m.jpg">
<h1><center><font color="red">**********DISPLAYING STARS**********</font></h1>
<script>
var i;
var j;
n=prompt("Enter the number of stars");
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
document.write(" * ");
document.write("<br><br>");
}
</script>
</center>
</body>
</html>
Comments
Post a Comment