PrecompiledWeb/web/Script/JsFunctions.js
(完整代码) 1KB
//图片等比例缩放
function DrawImage(ImgD,iwidth,iheight)
{
//参数(图片,允许的宽度,允许的高度)
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0)
{
//document.write(image.width);
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;
}
}
else
{
if(image.height>iheight)
{
ImgD.height=iheight/3;
ImgD.width=(image.width*iheight)/image.height/3;
}
else
{
ImgD.width=image.width/3;
ImgD.height=image.height/3;
}
}
}
ImgD.vspace=(ImgD.parentNode.parentNode.clientHeight-ImgD.height);
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
