<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<style type="text/css">
.MouseOverClick {background-color: #D9EFFD}
.MouseOutWhite {background-color: #FFFFFF}
</style>
<script language="javascript">
var e;
function change(){
if(e!=undefined){
e.className = "MouseOutWhite";
}
e=window.event.srcElement;
while(e=e.parentElement){
if(e.tagName=="TR") {
e.className = "MouseOverClick";
break;
}
}
}
</script>
<body>
<table align="center" width="400px" οnclick="change()" border="1">
<tr οnclick="event.cancelBubble=true">
<td>用户名</td><td>年龄</td><td>特长</td>
</tr>
<tr>
<td>张三</td><td>20</td><td>街舞</td>
</tr>
<tr>
<td>李四</td><td>21</td><td>唱歌</td>
</tr>
<tr>
<td>王五</td><td>21</td><td>画画</td>
</tr>
</table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<style type="text/css">
.MouseOverClick {background-color: #D9EFFD}
.MouseOutWhite {background-color: #FFFFFF}
</style>
<script language="javascript">
var e;
function change(){
if(e!=undefined){
e.className = "MouseOutWhite";
}
e=window.event.srcElement;
while(e=e.parentElement){
if(e.tagName=="TR") {
e.className = "MouseOverClick";
break;
}
}
}
</script>
<body>
<table align="center" width="400px" οnclick="change()" border="1">
<tr οnclick="event.cancelBubble=true">
<td>用户名</td><td>年龄</td><td>特长</td>
</tr>
<tr>
<td>张三</td><td>20</td><td>街舞</td>
</tr>
<tr>
<td>李四</td><td>21</td><td>唱歌</td>
</tr>
<tr>
<td>王五</td><td>21</td><td>画画</td>
</tr>
</table>
</body>
</html>