JS pictures in the specified proportional scaling code is very practical, we are mainly in the face of the Web page will see, if a picture is too big, so it has to be proportional processing, the following code is this function.
<HTML>
<HEAD>
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312" >
<title>onmousewheel</title>
<SCRIPT>
var count = 10;
function Picture ()
{
Count = counting (count);
Resize (count);
return false;
}
Function counting (count) {
if (Event.wheeldelta >=)
count++;
Else if (Event.wheeldelta <= -120)
count--;
return count;
}
Function Resize (count) {
OImage.style.zoom = count + ' 0% ';
Ocounter.innertext = count + ' 0% ';
}
</SCRIPT>
</HEAD>
<BODY>
<div align=center>
<span style= Font-weight:bold ">size =
<span id=" Ocounter "style=" color:red; " >100%</span></span>
<img id= "oimage" src= www.jzread.com/aaa.gif "onmousewheel=" return Picture (); ">
</div>
</BODY>
</html>