I'm using the method innerHTML();
to display 60 lines on the page. As soon as I need to delete 20 to 20 lines to each click on the button.
Full source code:
for (i = 0; i <= 60; i += 1) {
document.getElementById("lista").innerHTML += '<span>Linha </span>' + i.toString()+'<br/>';
}
<p id="lista"></p>
<hr>
<center>
<button onclick="document.getElementById('lista').innerHTML='';">Apagar</button>
DETAIL - I want to delete the lines from the bottom up.