Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<html>
<head>
<title>Untitled Document</title>
</head>
<script>
function PrintStars() {	

    var x = 0;
    var y = 10;
    
    for(x=0;x<10;x++)
    {
        for(y=0;y<=x;y=y+1)
        {
            document.getElementById("TableArea").innerHTML="*" + document.getElementById("etext").value;
            document.write = "*";
        }
    }
}
</script>

<body>
Enter a Number: <input id="etext" type="text" placeholder="Enter a number here"/>
<p id="TableArea"></p>
<input type="button" Value="Print" onclick="PrintStars();"/>
</body>
</html>
Posted
Updated 4-Sep-15 16:36pm
v3
Comments
Patrice T 5-Sep-15 18:30pm    
What is your problem ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900