<style type="text/css">
.red
{
background-color:red;
}
</style>
<script language="javascript" type="text/javascript">
window.onload=function()
{
var trList = document.getElementById("repeater");
for(var i=0;i<trList.rows.length;i++)
{
trList.rows[i].onclick=SetColor;
}
}
function SetColor()
{
var trList = document.getElementById("repeater");
for(var i=0;i<trList.rows.length;i++)
{
trList.rows[i].className="";
}
this.className="red";
}
</script>
repeater 是你Repeater表格的id