在页面中放大缩小图片:
<script language = "JavaScript">
function OpPic(o){
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;
if(zoom>0) o.style.zoom=zoom+'%';
return false;}
</script>
<img src="未命名.jpg" border=0 onmousewheel="return OpPic(this)" οnlοad="javascript:if(this.width>screen.width-600) this.style.width=screen.width-600;">
鼠标停留在页面,在DIV层中显示大图片:
<script language="vbscript">
function showDIV()
pic.innerhtml="<img src=""未命名.jpg"">"
end function
function closeDIV()
pic.innerhtml=""
end function
</script>
<img src="未命名.jpg" width="50" height="50" οnmοuseοver="vbscript:showDIV()" οnmοuseοut="vbscript:closeDIV()">
<div id="pic" style='position:absolute; z-index:20; '>
</div>