Javascript examples for DOM HTML Element:TableData
Get specific table cell
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//w w w .ja va 2 s . com var score = parseInt(document.getElementById('score').innerHTML); document.getElementById('score').innerHTML = score + 1; } </script> </head> <body> <table> <tbody> <tr> <td>score</td> <td id="score">2</td> </tr> </tbody> </table> </body> </html>