Js controls the mouse event movement and the effect of moving out of the display

  • 2020-03-30 04:08:26
  • OfStack

Mouse events can be moved and moved out of the effect can be customized using js, the following is an example, the effect is when the event changes the background color is also changed, 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"> The home page </div></td>
<td><div align="center" class="STYLE2"> male </div></td>
<td><div align="center" class="STYLE2"> female </div></td>
</tr>
</table>
</body> 

Related articles: