欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

鼠標(biāo)經(jīng)過(guò)tr時(shí),改變tr當(dāng)前背景顏色

 更新時(shí)間:2014年01月13日 10:11:04   作者:  
本篇文章主要介紹了鼠標(biāo)經(jīng)過(guò)tr時(shí),改變tr當(dāng)前背景顏色的示例代碼,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助
示例如下:
復(fù)制代碼 代碼如下:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>鼠標(biāo)經(jīng)過(guò)給tr換顏色</title>   
</head>
<body>
<table align="center" width="100%" border="1" cellspacing="1" cellpadding="1" >
  <tr style="cursor:hand " onmousemove="changeTrColor(this)">
    <td align="center">1</td>
    <td height="20">&nbsp;123</td>
    <td height="20">&nbsp;abvx</td>
    <td height="20">&nbsp;465465</td>
    <td height="20">546654654</td>
  </tr>
  <tr style="cursor:hand " onmousemove="changeTrColor(this)">
    <td align="center">1</td>
    <td height="20">&nbsp;123</td>
    <td height="20">&nbsp;abvx</td>
    <td height="20">&nbsp;465465</td>
    <td height="20">546654654</td>
  </tr>   
  <tr style="cursor:hand " onmousemove="changeTrColor(this)">
    <td align="center">1</td>
    <td height="20">&nbsp;123</td>
    <td height="20">&nbsp;abvx</td>
    <td height="20">&nbsp;465465</td>
    <td height="20">546654654</td>
  </tr>
</table>
<script type="text/javascript">
function changeTrColor(obj){   
    var _table=obj.parentNode;
    for (var i=0;i<_table.rows.length;i++){
        _table.rows[i].style.backgroundColor="";
    }   
    obj.style.backgroundColor="blue";
}
</script>
</form>
</body>
</html>
您可能感興趣的文章:

相關(guān)文章

最新評(píng)論