当前位置: 代码迷 >> ASP.NET >> 郁闷——散分!该怎么处理
  详细解决方案

郁闷——散分!该怎么处理

热度:8370   发布时间:2013-02-25 00:00:00.0
郁闷——散分!
<script   language= "javascript "   type= "text/javascript ">
var   selectedRowIndex   =   -1;
var   isSelected   =   false;
var   originalColor   =   '#FFFFFF ';
var   selectedColor   =   '#ff0000 ';
var   mouseOverColor   =   '#ff00ff ';
var   mouseOverSelectedColor   =   '#aa00aa ';
function   mouseOver(o){
isSelected   =   (selectedRowIndex   !=   undefined   ||   selectedRowIndex   !=   -1)   &&   selectedRowIndex   ==   o.rowIndex;
if(isSelected){
o.bgColor   =   mouseOverSelectedColor;
}
else{
o.bgColor   =   mouseOverColor;
}
}
function   mouseOut(o){
isSelected   =   (selectedRowIndex   !=   undefined   ||   selectedRowIndex   !=   -1)   &&   selectedRowIndex   ==   o.rowIndex;
if(isSelected){
o.bgColor   =   selectedColor;
}
else{
o.bgColor   =   originalColor;
}
}
function   mouseClick(o){
if(o.tagName   ==   "TR "){
for(i   =   0;   i   <   o.parentElement.rows.length;   i++){
o.parentElement.childNodes[i].bgColor   =   originalColor;
}
selectedRowIndex   =   o.rowIndex;
o.bgColor   =   selectedColor;
}
}
</script>

<table   border= "1 "   width= "100% ">
    <tr   onclick= "javascript:mouseClick(this); "   onmouseover= "javascript:mouseOver(this); "   onmouseout= "javascript:mouseOut(this); ">
<td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td>
    </tr>
    <tr   onclick= "javascript:mouseClick(this); "   onmouseover= "javascript:mouseOver(this); "   onmouseout= "javascript:mouseOut(this); ">
<td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td>
    </tr>
    <tr   onclick= "javascript:mouseClick(this); "   onmouseover= "javascript:mouseOver(this); "   onmouseout= "javascript:mouseOut(this); ">
<td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td> <td   width= "20% ">   </td>
    </tr>
</table>

------解决方案--------------------------------------------------------
jf
------解决方案--------------------------------------------------------
差不多了..接分
------解决方案--------------------------------------------------------
jf
------解决方案--------------------------------------------------------
jf
------解决方案--------------------------------------------------------
  相关解决方案