function seethestars1() {
for (var i = 0; i <= 10; i++) {
for (var j = 0; j < i; j++) {
document.getElementById("emptytext2").value += "*";
}
document.getElementById("emptytext2").value += "
";
}
}
<textarea id="emptytext2" name="S2">
<input id="emptytext3" type="button" value="Click for the stars" onclick ="seethestars1()" />