|
用记事本打开inc/Dv_ubbcode.asp,找到
Private Function bbimg(strText,ssize) Dim s s=strText re.Pattern="<img(.[^>]*)>" If ssize=500 Then s=re.replace(s,"<img$1 onload=""javascript:if(this.width>"& ssize &")this.style.width="&ssize&";"">") Else s=re.replace(s,"<img$1 onload=""javascript:if(this.width>"& ssize &")this.style.width="&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">") End If bbimg=s End Function
修改为
Private Function bbimg(strText,ssize) Dim s s=strText re.Pattern="<img(.[^>]*)>" If ssize=500 Then s=re.replace(s,"<img$1 onmousewheel=""return bbimg(this)"" onload=""javascript:if(this.width>"& ssize &")this.style.width="&ssize&";"">") Else s=re.replace(s,"<img$1 onmousewheel=""return bbimg(this)"" onload=""javascript:if(this.width>"& ssize &")this.style.width="&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">") End If bbimg=s End Function
用记事本打开Main.js,找到
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) { if(event.ctrlKey) { var zoom = parseInt(o.style.zoom, 10) || 100; zoom -= event.wheelDelta / 12; if(zoom > 0) { o.style.zoom = zoom + '%'; } return false; } else { return true; } }
注意:此方法与动网原来的缩放略有不同,要求鼠标移动到图片上按住Ctrl键滚动鼠标滚轮图片才缩放,不按住Ctrl则为整个页面滚动,图片不缩放! (出处:CodeFans转载) |