princess princess - 1 month ago 8
HTML Question

Without the first line table

Help

for (var i = 1; i<mo.rows.length;i++) {
mo.rows[i].cells[1].innerText=na.rows[i % na.rows.length].cell[0].innerText
}


Image

Answer

You must divide by lenght-1 and takes the value from line number 1. Thats why you must substract 1 from length and add 1 to position

for (var i = 1; i<mo.rows.length;i++) {
    mo.rows[i].cells[1].innerText=na.rows[i % (na.rows.length-1)+1].cell[0].innerText 
}