简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

JS使用oumousemove和oumouseout动态改变图片显示的方法

来源:易贤网   阅读:1071 次  日期:2015-04-02 16:19:07

温馨提示:易贤网小编为您整理了“JS使用oumousemove和oumouseout动态改变图片显示的方法”,方便广大网友查阅!

本文实例讲述了JS使用oumousemove和oumouseout动态改变图片显示的方法。分享给大家供大家参考。具体如下:

鼠标放到图片上时图片会自动变大,鼠标离开图片还原

<!DOCTYPE html>

<html>

<head>

<script>

function bigImg(x)

{

x.style.height="64px";

x.style.width="64px";

}

function normalImg(x)

{

x.style.height="32px";

x.style.width="32px";

}

</script>

</head>

<body>

<img onmouseover="bigImg(this)" onmouseout="normalImg(this)"

border="0" src="smiley.gif" alt="Smiley" width="32" height="32">

<p>The function bigImg() is triggered when the user moves

the mouse pointer over the image.</p>

<p>The function normalImg() is triggered when the mouse

pointer is moved out of the image.</p>

</body>

</html>

更多信息请查看IT技术专栏

更多信息请查看脚本栏目
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:js使用onmousemove和onmouseout获取鼠标坐标的方法
下一篇:JavaScript判断字符长度、数字、Email、电话等常用判断函数分享
易贤网手机网站地址:JS使用oumousemove和oumouseout动态改变图片显示的方法
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!