asp程序修改问题

来源:百度知道 编辑:UC知道 时间:2024/06/23 20:51:36
strTemp= strTemp & "<img src=" & rsProduct("DefaultPicUrl") & " width='400' height='300' onload='javascript:DrawImage(this);'>

我修改图片的宽高 为什么不顶用 还是那样大小
<!--
var flag=false;
function DrawImage(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 300/400){
if(image.width>300){
ImgD.width=300;
ImgD.height=(image.height*300)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt="点击查看详细信息...";
}
else{
if(image.height>400){
ImgD.height=400;
ImgD.width=(image.width*400)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt="点击查看详细信息...&quo

你只给出了了这张图片的设置代码 所以我不敢肯定
估计是这张图片外是不是有什么文本框啊 已经固定了它的取值范围 当超过那个范围后肯定是无效的

javascript:DrawImage(this);
查看 DrawImage 这个JS函数怎么处理的