I'm trying to figure out how to add text boxes after hitting the "submit" button. I've tried everything I know, but I can't seem to get an outcome. I also want to make the max number of text boxes 25.
Here's some of the HTML:
<div class="title">
<h1>Calculated Test Scores</h1>
</div>
<h5># of Students: <input type="text"></h5>
<div class="container">
<button type="button" class="submit">Submit</button>
</div>
<h5>Scores: <input type="text"></h5>
<div class="container">
<button type="button" class="calculate">Calculate</button>
</div>
<h6>The average is:</h6>
And this is the JS:
$(function() {
$(".submit").click(function() {
for(var i=0; i < 26; i++)
$(".submit").append(arr[i])
});
$(".calculate").click(function() {
for(var i=0; i < arr.length; i++)
sum=sum + arr[i];
Average = sum/arr.length;
});
});