用js实现鼠标移动文字上变色

来源:互联网 发布:网络舆情分析系统 编辑:程序博客网 时间:2024/04/20 11:54
</pre><pre name="code" class="html"><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><title></title><script type="text/javascript">function red(e){document.getElementById("hello").style.color="#FF1111";}function black(e){document.getElementById("hello").style.color = "#000000";}</script></head><body><span style="white-space:pre"></span><p id="hello" onmousemove="red();" onmouseout="black();">Hello World!</p></body>

0 0
原创粉丝点击