function DrawImage(ImgD, FitWid, FitHeight) {o = new Image();
image.src = ImgD.src;
if (image.width > 0 && image.height > 0) {
FitWidth / FitHeight) {
if (image.width > FitWidth) {
ImgD.height = (image.height * FitWidth) / image.width;
{
ImgD.width = image.width;
}
} else {
. height = FitHeight;
ImgD.width = (image.width * FitHeight) / ImgD.width = 圖片.width;
.高度;
}
}
}
}
}
}