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

推荐订阅源

S
Securelist
O
OpenAI News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Google Online Security Blog
Google Online Security Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
News and Events Feed by Topic
S
Security Affairs
SecWiki News
SecWiki News
Project Zero
Project Zero
L
Lohrmann on Cybersecurity
P
Proofpoint News Feed
P
Palo Alto Networks Blog
L
LINUX DO - 最新话题
H
Hacker News: Front Page
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
Intezer
Simon Willison's Weblog
Simon Willison's Weblog
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
K
Kaspersky official blog
The GitHub Blog
The GitHub Blog
I
InfoQ
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
B
Blog
IT之家
IT之家
AWS News Blog
AWS News Blog
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
Spread Privacy
Spread Privacy
N
News and Events Feed by Topic
Security Latest
Security Latest
美团技术团队
C
Check Point Blog
WordPress大学
WordPress大学
T
Tenable Blog
S
Security @ Cisco Blogs
Last Week in AI
Last Week in AI
博客园 - 聂微东
月光博客
月光博客
博客园 - 【当耐特】
S
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Secure Thoughts
Schneier on Security
Schneier on Security
C
Cisco Blogs
Cyberwarzone
Cyberwarzone

博客园 - KIS

计算页面执行时间的PHP小程式 五种常见的ASP.NET安全缺陷 如何防止控制客户端使其用同一帐户重复登录系统 VBscript常用函数 ASP.NET中计算两个日期之间的相差的天数的方法 ASP.NET程序中常用的33种代码 - KIS - 博客园 实用代码集锦 - KIS - 博客园 实用代码(Javascript脚本) - KIS - 博客园 利用ASP技术实现文件直接上传功能 如何利用ASP把图片上传到数据库 CSDN如何把图片存入到数据库 用VB将ASP代码封装成DLL 多个表单和多个图片一起上传完美解决方案 HTML七种加密解密 - KIS - 博客园 JS常用脚本、html代码大全、对联广告代码效果大全 - KIS - 博客园 HTML代码大全 一些常用/不常用的html代码 - KIS - 博客园 ASP中几种分页显示的比较 - KIS - 博客园 Windows 2000/XP/2003环境下IIS+PHP+MYSQL安装配置
用鼠标滚轮实现图片的缩放 - KIS - 博客园
KIS · 2007-04-12 · via 博客园 - KIS

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用滚轮实现图片缩放</title>
</head>
<script language="JavaScript">
    function zoomimg(img){
    //img.style.zoom获取img对象的缩放比例,并转为十进制整数
    var zoom = parseInt(img.style.zoom,10);
    if (isNaN(zoom)){    //当zoom非数字时zoom默认为100%
    zoom = 100;
    }
    //event.wheelDelta滚轮移动量上移+120,下移-120;显示比例每次增减10%
    zoom += event.wheelDelta / 12;
    //当zoom大于10%时重新设置显示比例
    if (zoom>10) img.style.zoom = zoom + "%";
    }
</script>

<body>
<br>
<!--onmousewheel:当滚轮移动时触发-->
<img src="图片路径" onmousewheel="zoomimg(this)">

</body>
</html>

注意看红色部分...