皮皮虾做法大全:用java script编写函数实现鼠标移动字体颜色改变

来源:百度文库 编辑:中科新闻网 时间:2024/05/05 19:20:45
颜色变化函数
1,color_move_on(c)
鼠标移过来的时候,文字颜色从原有的变化为c,c传进的颜色。
2,color_move_out(c)
鼠标移开的时候,文字颜色从原有的变化为c,c传进的颜色。

我想最好加一个参数,就是你想变色的文字对象

<script language=javascript>
function color_move_on(obj, c)
{
obj.style.color = c;
}

function color_move_out(obj, c)
{
obj.style.color = c;
}
</script>