用鼠标滚珠来放大缩小图片大小

来源:互联网 发布:淘宝岚家正品代购 编辑:程序博客网 时间:2024/06/11 04:09
<HTML>
    
<HEAD>
        
<title>WebForm4</title>
        
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        
<meta name="CODE_LANGUAGE" Content="C#">
        
<meta name="vs_defaultClientScript" content="JavaScript">
        
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
        
<script language="javascript">
            
function bbimg(o)
            
{
                
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
                
return false;
            }
 
        
</script>
    
</HEAD>
    
<body MS_POSITIONING="GridLayout">
        
<form id="Form1" method="post" runat="server">
            
<img src="Images/mzs.jpg" onload="javascript:if(this.width>screen.width*0.7)this.style.width=screen.width*0.7;"
                onmousewheel
="return bbimg(this)">
        
</form>
    
</body>
</HTML>
原创粉丝点击