3
<table border='1' id="tabela">
<tbody>
</tbody>
</table>
would like to print differently
$(document).ready(function(){
var i =0;
while(i< 100){
var resto = i%10;
if(i%10 == 0){
$("tbody").append("<tr>");
}
$("tbody").append("<td>"+i+"</td>");
i++;
//document.getElementById("tabela").innerHtml += "<tr><td>"+i+"</tr></tr>";
if(i%10 == 0){
$("tbody").append("</tr>");
}
}
});
actually, I wanted to print that way:
[0][5][10][15][20]
[1][6][11][16][21]
[2][7][12][17][22]
[3][8][13][18][23]
[4][9][14][19][24]
how do I do?
If any answer helped you or solved your problem, take a vote and mark it as the correct answer, otherwise give more details about what you tried and the results you got. Always vote and choose the right answers is good practice and helps other users.
– user3603