Javascript examples for DOM HTML Element:TableData
Rotating through Values in a Table Cell
<html> <head></head> <body> <script type="text/javascript"> var n = 0;/*from w w w. j av a2 s . co m*/ document.write("<table>"); var i; for(i=0;i<10;i++){ document.write('<tr><td id="Cell' + i + '">'+i+'</td></tr>\n'); } document.write("</table>"); function makeTable(){ n++; for(i=0;i<10;i++){ var cell="Cell"+i; document.getElementById(cell).innerHTML=n + i; } timer(); } function timer(){ setTimeout(makeTable,5000); } timer(); </script> </body> </html>