<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function () {
$("tr").mouseenter(function () {
//$("tr").css("background-color", "white");
$(this).siblings().css("background-color", "white");//使用siblings()获取兄弟节点
$(this).css("background-color", "yellow");
});
});
</script>
</head>
<body>
<table style="width: 100%;">
<tr>
<td>撒地方</td>
<td> 撒地方</td>
<td> 撒地方</td>
</tr>
<tr>
<td> 啊啊啊</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> 是打发士大夫</td>
<td> </td>
</tr>
</table>
</body>
</html>