1 回答
TA贡献1812条经验 获得超5个赞
<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
- 1 回答
- 0 关注
- 536 浏览
添加回答
举报