This is my hidden div.
<div id="showInstituteOne" style="display:none">
<h3>Institutes</h3>
<div class="form-group">
<label class="col-sm-3 control-label">Institute</label>
<div class="col-sm-9">
@Html.TextBoxFor(m => m.StudentInstitutes[1].Name, new { @class = "form-control student-institute", @id = "studentInstitute" })
</div>
</div>
</div>
This is my button
<div class="form-group">
<div class="col-sm-6">
<input type="button" value="Add More Institution" onclick="showDiv()" />
</div>
</div>
This is the JS function
var countClick = 0;
function showDiv() {
document.getElementById('showInstituteOne').style.display = "block";
countClick++;
}
i want to display the div as many time the button is hit.Count click for updating the id number of the input field.