Zoom code:
Copy codeThe Code is as follows:
Zoom code:
<Script type = "text/javascript">
// Proportional scaling of the image
Var flag = false;
Function DrawImage (ImgD, iwidth, iheight ){
// Parameter (image, allowed width, allowed height)
Var image = new Image ();
Image. src = ImgD. src;
If (image. width> 0 & image. height> 0 ){
Flag = true;
If (image. width/image. height> = iwidth/iheight ){
If (image. width> iwidth ){
ImgD. width = iwidth;
ImgD. height = (image. height * iwidth)/image. width;
} Else {
ImgD. width = image. width;
ImgD. height = image. height;
}
ImgD. alt = image. width + "×" + image. height;
}
Else {
If (image. height> iheight ){
ImgD. height = iheight;
ImgD. width = (image. width * iheight)/image. height;
} Else {
ImgD. width = image. width;
ImgD. height = image. height;
}
ImgD. alt = image. width + "×" + image. height;
}
}
}
</Script>
Page code:
Make a good speech!
Page code:
1.
Make a good speech!