For example:
<table id=tb> <tr><th> </th><th> </th><th> </th><th> </th></tr> <tr><td> </td><td> </td><td> </td><td> </td></tr> <tr><td> </td><td> </td><td> </td><td> </td></tr> </table>
And how to traverse assignments in JS?
Program code
var count=0; for(i=0; i < ("tb1").; i++) { for(j=0; j < ("tb1").rows(i).; j++) { ("tb1").rows(i).cells(j).innerText = count; count++; } }
I saw another way to use dom (but I didn't try it myself, I don't know why)
<table > <tr><td>A monk has water to drink。</td></tr> <tr><td>Two monks carry water to drink。</td></tr> <tr><td>Three monks have no water to drink。</td></tr> </table> <script> var msg=”” var mylist=("mylist") for (i=0; i<; i++){ var tr=[i]; for(j=0;j<[j].length; j++) { var td=[j]; msg+=; } } alert(msg); </script>