Home  >  Article  >  Web Front-end  >  js controls mouse event movement and removal effect display_javascript skills

js controls mouse event movement and removal effect display_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:33:301659browse

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> 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn