Solution:
<HTML>
<head>
<script>
function find()
{
var no1=parseInt(frm.txt1.value);
for (i=1; i<=no1; ++i)
43
{
for (j=1; j<=i; ++j)
{
document.write("* ");
}
document.write("<br>");
}
}
</script>
</head>
<body>
<form name="frm">
Enter a Number:<input name="txt1" type="text" /><br><br>
<input name="b1" onclick="find();" type="button" value="display" /></form>
</BODY>
</HTML>
0 Comments