惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Vercel News
Vercel News
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
量子位
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
IT之家
IT之家
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
博客园 - 三生石上(FineUI控件)

博客园 - 站得更高,看得更远

使用ServletContextListener在服务器启动和关闭时创建和关闭缓存 Tomcat的class加载的优先顺序一览 汉字转拼音缩写 - 站得更高,看得更远 - 博客园 tomcat 中解决打开xls文件的乱码问题 弹出窗口居中 弹出窗口大全(js) 网页常用小技巧(JavaScript) - 站得更高,看得更远 - 博客园 Javascript 小技巧集 LookupDispatchAction, MappingDispatchAction深入分析 Strus 2的新表单标志的使用 Struts 2与AJAX(第二部分) Struts 2与AJAX(第一部分) Struts 2中的OGNL 常用的Struts 2.0的标志(Tag)介绍 在Struts 2.0中国际化(i18n)您的应用程序 在Struts 2.0中实现表单数据校验(Validation) 在Struts 2中实现IoC 在Struts 2中实现文件上传 转换器(Converter)——Struts 2.0中的魔术师
鼠标在图片上滚动放大或者缩小图片的代码 - 站得更高,看得更...
站得更高,看得更远 · 2008-11-11 · via 博客园 - 站得更高,看得更远

<HTML>
<HEAD>


<TITLE>onMouseWheel Event Sample</TITLE>

<!-- <LINK REL="stylesheet" HREF="/workshop/basicSDKIE4.css" TYPE="text/css"> -->

<STYLE>
BODY
{
 background
:#FFFFFF;
 color
:black;
 font-size
:.75em;
 font-family
:verdana;
 
}

H1 
{
 color
:#3366CC;
 font-size
:1.5em;
 
}

IMG 
{ 
    border
:2px solid #000000;
    margin
:10px;
 
}
 
A  
{
 color
:#3366CC;
 text-decoration
:none;
 
}
   
</STYLE>
<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>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<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="/workshop/graphics/sprinter.jpg" onmousewheel="return Picture();" >

<br>
<br>
<br>
<CLASS="clsIncCpyRt" HREF="http://www.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top">&copy; 2006 Microsoft Corporation. All rights reserved. Terms of use</A>.
</BODY>
</HTML>

posted on 2008-11-11 21:57  站得更高,看得更远  阅读(671)  评论(0)    收藏  举报