您的位置:首页 > 编程语言

图片放大缩小代码

2007-05-15 11:43 239 查看
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图片缩放演示</title>
<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>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<img onmousewheel="return bbimg(this)" src="winxp.gif" width="466" height="129"> '在IMG中添加onmousewheel="return bbimg(this)"属性 </td>
</tr>
</table>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: