当鼠标移到单元格时背景变色


很简洁的代码,点击即可运行该代码
<body>
<table border="1px">
 <tr>
  <th id="id_item1" onmouseover="this.bgColor='green'" onmouseout="this.bgColor=''">Menu Item1</th>
 </tr>


 <tr>
  <th>Menu Item2</th>
 </tr>
</table>
</body>

 

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3