Change the current background color of TR when the mouse passes through TR

Source: Internet
Author: User

  This article mainly introduces the mouse after the TR, change the current background color of TR sample code, need friends can come to the reference, I hope to help you.

Examples are as follows: The code is as follows: <html> <head> <meta http-equiv= "Content-type" content= text/html; CHARSET=GBK "> <title> mouse Pass to TR change color </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=" > 123 </td>     <TD height= "" > abvx</td>     <td height= ">" 465465</td> & nbsp   <TD height= ">546654654</td>   </tr>   <tr style=" Cursor:hand "onmousemove=" Changetrcolor (This) ">     <TD align=" center ">1</td>     <TD height=" > 123 </td>     <TD height= "" > abvx</td>     <td height= ">" 465465</td> & nbsp   <TD height= >546654654</td>   </tr> &NBsp     <TR style= "Cursor:hand" onmousemove= "Changetrcolor (This)" >     <TD align= "center" > 1</td>     <TD height= "a" > 123</td>     <td height= ">" abvx</td> &nb Sp   <TD height= "> 465465</td>     <td height=" ">546654654</td>   </TR > </table> <script type= "Text/javascript" > Function changetrcolor (obj) {        var _t Able=obj.parentnode;     for (Var i=0;i<_table.rows.length;i++) {        _table.rows[i]. Style.backgroundcolor= "";    }         obj.style.backgroundcolor= "Blue"; } </script> </form> </body> </html>  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.