JS Code (whatever you want ):
<Script language = "JavaScript">
<! --
Var flag = false;
Function DrawImage (ImgD ){
Var image = new Image ();
Image. src = http://www.jb51.net/htmldata/2006-01-08/ImgD.src;
If (image. width> 0 & image. height> 0 ){
Flag = true;
If (image. width/image. height & gt; = 180/110 ){
If (image. width> 180 ){
ImgD. width = 180;
ImgD. height = (image. height * 110)/image. width;
} Else {
ImgD. width = image. width;
ImgD. height = image. height;
}
/* ImgD. alt = "bigpic "*/
}
Else {
If (image. height & gt; 110 ){
ImgD. height = 110;
ImgD. width = (image. width * 110)/image. height;
} Else {
ImgD. width = image. width;
ImgD. height = image. height;
}
/* ImgD. alt = "bigpic "*/
}
}
}
// -->
</Script>
Image usage:
Width = "180" height = "110" note that it is best to limit it here. If you do not limit the size of the loaded graph, it will become larger and then narrow down. This process is ugly if the graph is larger. here is the width and height. In the previous JS, modify the width and height.
The graph will not be deformed. It will only be scaled down by the ratio column, rest assured