链接类
VML
按钮类
标题类
表单类
表格类
菜单类
窗口类
对象类
滚动条
键盘类
框架类
例子类
模拟类
日期类
色彩类
鼠标类
数学类
图片类
文字类
下拉框
样式类
游戏类
状态栏
资料类
字幕类
其它类
·
鼠标移动测试
·
鼠标形状
·
拖动页面
·
鼠标形状
·
跟着鼠标的图形
·
拖动页面
·
很酷的鼠标效果
·
坐标
·
拖动图层
·
十字线
您当前位置:
好素材首页
-> 网页特效 -> 鼠标类
查看信息
onmousewheel event
好素材网 www.HaoSc.com 02月22日 11:49
[
查看演示
] 源码如下
----------------------------------------------------------
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>onMouseWheel Event Sample-www.51windows.Net</TITLE>
<SCRIPT>
var count = 10;
function Picture()
{
count = Counting(count);
Resize(count);
return false;
}
function Counting(count){
if (event.wheelDelta >= 120)
count++;
else if (event.wheelDelta <= -120)
count--;
return count;
}
function Resize(count){
oImage.style.zoom = count + '0%';
oCounter.innerText = count + '0%';
}
</SCRIPT>
</HEAD>
<BODY>
<h1>onmousewheel event</h1>
<P>
This sample uses the onmousewheel event to expand or contract the picture below. <br><br>
Move the cursor over the picture and roll the mouse wheel up and down.</P>
<span style="font-weight:bold">Size =
<span id="oCounter" style="color:red;">100%</span></span>
<br>
<img id="oImage" src="/w386.gif" onmousewheel="return Picture();" >
<br>
<br>
<br>
<A HREF="http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/onmousewheelEX.htm" target="_blank">http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/onmousewheelEX.htm</A>.
</BODY>
</HTML>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div>
此信息共 1 页 [
1
]