怎样使Repeater出来的记录随鼠标移动而改变颜色?
datagrid可以在ItemDataBound里做,Repeater里无效,不知如何做?
------解决方案-------------------- <tr align=center id= " + rowname + " onmousemove=Change_Color( ' " + rowname + " ')> "
strHtml += " <td> ";
<script language= "javascript ">
var x,y,thisRow;
thisRow = " ";
function Change_Color(path)
{
if(thisRow == " ")
{
document.all(path).className = "CBorder ";
}
else
{
document.all(thisRow).className = " ";
document.all(path).className = "CBorder ";
}
thisRow = path;
}
</script>
------解决方案--------------------你的Repeater的Itemtemplate模板里有Tr吗? 有就直接在tr里写onmouseover 和onmouseout事件来改变颜色就好了。