<div style="width: 200px; height: 200px; z-index:
1; overflow: hidden; position: relative;" id="panl">
<img onclick="zoom();" id="img" border="0" src="http://www.webjx.com/img/200406301.jpg" width="173" height="232" style="left: 0; position: absolute; top: 0;"></div>
<script type="text/javascript">
<!--//more javascript http://www.webjx.com
var ZOOM=1.5
img.style.zoom=1;
function zoom(){
var divW=parseFloat(panl.style.width),divH=parseFloat(panl.style.height);
var x=event.offsetX*img.style.zoom*ZOOM;
var y=event.offsetY*img.style.zoom*ZOOM;
img.style.zoom*=ZOOM;
img.style.left=divW/2-x;
img.style.top=divH/2-y;
}
//-->
</script>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]