Javascript examples for DOM HTML Element:TableHeader
TableHeader abbr Property - Change the value of the abbr attribute of a <th> element with id "myTh":
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } </style>// w w w . jav a2 s . c o m </head> <body> <table> <tr> <th id="myTh" abbr="Make">Item</th> <th abbr="Model">Value</th> </tr> <tr> <td>Toys</td> <td>2</td> </tr> </table> <br> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myTh").abbr = "Company"; document.getElementById("demo").innerHTML = "changed"; } </script> </body> </html>