您的位置:首页 > Web前端 > JavaScript

js事件(onmouseover和onmouseout)

2015-10-22 14:02 429 查看
<!doctype html>
<html>
<body>
<div onmouseover="mOver(this)"     onmouseout="mOut(this)"  style= background-color:#D94A38;width:120px;height:20px;padding:40px;>Mouse Over Me</div>
<script>
function mOver(o)
{
o.innerHTML="Really good!      Thank you!"
}
function mOut(o)
{
o.innerHTML="Mouse Over Me"
}
</script>
</body>
<html>

鼠标放上去前:

鼠标放上去后:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: