修改inc\main.js文件,在第201行左右,找到
function bbimg(o){
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
改为
function bbimg(o){
// var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
// return false;}
或者修改:把inc\Dv_ubbcode.asp 中的这个部分(大概在291行)
If ssize=500 Then
s=re.replace(s,"<img$1 onmousewheel=""return bbimg(this)"" onload=""javascript:if(this.width>screen.width-"&ssize&")this.style.width=screen.width-"&ssize&";"">")
Else
s=re.replace(s,"<img$1 onmousewheel=""return bbimg(this)"" onload=""javascript:if(this.width>screen.width-"&ssize&")this.style.width=screen.width-"&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">")
If ssize=500 Then
s=re.replace(s,"<img$1onmousewheel=""return bbimg(this)"" onload=""javascript:if(this.width>screen.width-"&ssize&")this.width=screen.width-"&ssize&";"">")
Else
s=re.replace(s,"<img$1onload=""javascript:if(this.width>screen.width-"&ssize&")this.width=screen.width-"&ssize&";if(this.height>100)this.height=100;"">")
End If
1、修改if(this.height>100)this.height=100; 为:if(this.height>100)this.style.height=100; 这样做可以保证大部分图片按比例缩放,只有少数特殊的图片会被变形。
2、修改if(this.height>100)this.height=100; 为:if (this.height>100){var rate=100 / this.height;this.style.width=this.width * rate;}