Javascript examples for CSS Style Property:background
Change element background with CSS style
<html> <head> <script type="text/javascript"> function changeTrStyle()/*from w w w.j a v a2 s . c om*/ { document.getElementById("trId").style.background = "red"; } </script> </head> <body> <table> <tbody> <tr id="trId"> <td> <input type="text" onfocus="changeTrStyle()"> </td> </tr> </tbody> </table> </body> </html>