1
I’m using the method innerHTML();
to display 60 lines on the page. As soon as, I need to delete 20 to 20 lines à every click on the button.
Complete 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 bottom lines up.
Where are the lines? In a text field?
– Rodrigo Rigotti
I tried to help, see if you can.
– Pedro Luzio
How is the HTML of these lines in DOM? com
<p>
?– Sergio