I have been searching for this short implementation some time ago. There are also many ways to achieve it online.
I found this method yesterday, and it seems that the Code is the least.
Js ff and other support for css under ie: hover should be able to withstand this problem.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <pead> <meta http-equiv =" content-Type "content =" text/html; charset = gb2312 "/> <title> untitled document </title> <style type =" text/css "> # B _g_date tr {event: expression (onmouseover = function () {this. style. backgroundColor = '# E3FFC9'}, onmouseout = function () {this. style. backgroundColor = '# ffff'}) ;}# B _g_date tr: hover {background: # E3FFC9 ;}# B _g_date td {height: 20px ;} </style> </pead> <body> <table width = "500" border = "1" height = "300" id = "B _g_date"> <tr> <td> </td> </tr> <td> </tr> <tr> <td> </tr> <tr> <td> </td>/ tr> <td> </td> </tr> <td> </ td> </tr> <td> </td> <td> </td> </tr> <td> </td> <td> </tr> <td> </td> <td> </tr> <td> </td> </td> </tr> <td> </td> <td> </td> </tr> <td> </td> <td> </tr> <td> </ td> </tr> <td> </td> <td> </td> </tr> <td> </td> <td> </tr> <td> </td> <td> </tr> <td> </td> </td> </tr> <td> </td> <td> </td> </tr> <td> </td> <td> </tr> <td> </ td> </tr> </table> </ body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]