Home > Article > Web Front-end > js controls mouse event movement and removal effect display_javascript skills
The movement and removal effects of mouse events can be customized using js. There is an example below. The effect is that the background color changes when the event changes. It is suitable for novice friends
<style type="text/css"> .style0{ background-color:#FFFF00; } .style1{ background-color:#00FFFF; } </style> </head> <body> <table width="576" height="79" border="1"> <tr> <td id="td1" onmousemove="document.getElementById('td1').className='style0';" onmouseout="document.getElementById('td1').className='style1'"><div align="center" class="STYLE2">主页</div></td> <td><div align="center" class="STYLE2">男</div></td> <td><div align="center" class="STYLE2">女</div></td> </tr> </table> </body>