原理:图片加载完后把图片的尺寸固定在一个固定的范围之内。。 JS Code: script type="text/javascript" var proMaxHeight=100; var proMaxWidth=100; function ImgAuto(ImgD) { var image=new Image(); image.src=ImgD.src; image.onload = function(){ if(image.width0&&image.height0) { var rate=(proMaxWidth/image.widthproMaxHeight/image.height)?proMaxWidth/image.width:proMaxHeig...[ 查看全文 ]
onMouseWheel Event Sample-www.51windows.Net onmousewheel event This sample uses the onmousewheel event to expand or contract the picture below. Move the cursor over the picture and roll the mouse wheel up and down. Size = 100% http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/onmousewheelEX.htm. [ 查看全文 ]