0
I was struck by a doubt recently, by which I must manipulate a certain number of elements hidden through the display:none; that it is defined on the span that involves all of them.
Example
<html>
<head>
<script>
    var linhas = 25;
function mostrarGrupo() {
    for( var i = linhas; i < linhas + 5; i++) {
        document.getElementById('resultado').innerHTML += i + '<br>'
    }
}
</script>
</head>
</body>
    <input type="button" value="mais" onclick="mostrarGrupo()"/>
<br><br>
    <div id="resultado">   </div>
   
<span id="dados" style="display:none">
// Primeiro Grupo
<hr id='linha1'> 
<hr id='linha2'> 
<hr id='linha3'> 
<hr id='linha4'> 
<hr id='linha5'> 
// Segundo Grupo
<hr id='linha6'> 
<hr id='linha7'> 
<hr id='linha8'> 
<hr id='linha9'> 
<hr id='linha10'> 
// Terceiro Grupo
<hr id='linha11'> 
<hr id='linha12'> 
<hr id='linha13'> 
<hr id='linha14'> 
<hr id='linha15'> 
// Quarto Grupo
<hr id='linha16'> 
<hr id='linha17'> 
<hr id='linha18'> 
<hr id='linha19'> 
<hr id='linha20'> 
// Quinto Grupo
<hr id='linha21'> 
<hr id='linha22'> 
<hr id='linha23'> 
<hr id='linha24'> 
<hr id='linha25'> 
</span>
</body>
</html>
For this, it will only be necessary to show inside the id resultado each 5 hidden element.
Every click 5 more hidden elements in the HTML document, it becomes visible in the id resultado.
See how it should look:

So focus on this how I can accomplish this?
I don’t quite understand, is this hidden span your "database"? each time you click you want to pick up 5 rows of "database " and play in results ?
– Washington da costa
@Washingtondacosta How did you not understand?! You explained correctly what I intend to do.
– Diego Henrique
I was just trying to make sure I got it right, since I’ve never seen a "database" like that. It is no use someone to propose an answer by searching for the tags and then you say you will search from a database via ajax (which would be correct in my opinion)
– Washington da costa