Web速查-索引

定义

onmouseout 属性在鼠标指针移动到元素外时触发。

onmouseout 属性不适用以下元素:<base><bdo><br><head><html><iframe><meta><script><style><title>

语法

<element onmouseout="script">

属性

描述
script 发生 onmouseout 时运行的脚本。

实例

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>鱼C-零基础入门学习Web(Html5+Css3)</title>
<script>
function bigImg(x)
{
x.style.height="168px";
x.style.width="718px";
}
function normalImg(x)
{
x.style.height="84px";
x.style.width="359px";
}
</script>
</head>
<body>
<img onmousemove="bigImg(this)" onmouseout="normalImg(this)" border="0" src="../img/logo.png" alt="Smiley" >
<p>函数 bigImg() 在鼠标指针移动到图像上时触发。此函数放大图像。</p>
<p>函数 normalImg() 在鼠标指针移出图像时触发。此函数把图像的高度和宽度重置为正常尺寸。</p>
</body>
</html>
Smiley

函数 bigImg() 在鼠标指针移动到图像上时触发。此函数放大图像。

函数 normalImg() 在鼠标指针移出图像时触发。此函数把图像的高度和宽度重置为正常尺寸。