标签:zoom window oct 改变 nbsp code his wal order
<!DOCTYPE html">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>通过鼠标滚动-放大缩小图片</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<style>
img{
zoom: 100%;
}
</style>
</head>
<script language="javascript">
function bigimg(i)
{
var e=e || window.event;//window.event代表着事件对象的状态.只有在事件发生时生效
var zoom = parseInt(i.style.zoom,10)||100;
zoom += e.wheelDelta / 12;
if(zoom > 0 )
i.style.zoom=zoom+‘%‘;
return false;
}
</script>
<body>
<h3>请滚动鼠标滚轮-火狐浏览器不兼容</h3>
<center>
<a target="_blank">
<img src="img/wall7.jpg" width="461" height="277" border="1" onmousewheel="return bigimg(this)">
</a>
</center>
</body>
</html>
标签:zoom window oct 改变 nbsp code his wal order
原文地址:http://www.cnblogs.com/lubenxin/p/7096526.html