Change td tr background color on mouseover

Use CSS or JavaScript change table td tr background color on mouseover.

CSS:
.xxx tr {background-color:#fff;}
.xxx tr:hover {background-color:#f4f4f4;}

or

JavaScript:
<td onMouseOver="this.bgColor='#f4f4f4'" onMouseOut="this.bgColor='#fff'" bgColor=#fff>xxxx</td>

Via: http://www.webcodingtech.com/javascript/tablecell-colorchange.php

,

jon6773 發表在 痞客邦 PIXNET 留言(0) 人氣()