废话不多说了,直接给大家贴js实现点击图片显示原图片的代码,具体代码如下所示:
100 && height>80){
ImgD.width=100;
ImgD.height=80;
ImgD.alt=image.width+"×"+image.height;
}else{
if(image.width>0 && image.height>0){
flag=true;
if(image.width>300 || image.height>200){
ImgD.width=image.width/2;
ImgD.height=image.height/2;
ImgD.alt=image.width+"×"+image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
ImgD.alt=image.width+"×"+image.height;
}
}
}
}