恢复SP1的图片随鼠标滚轮缩放功能
减小字体 增大字体 作者:未知 来源:未知 发布时间:2005-12-3 15:08:26用记事本打开inc/Dv_ubbcode.asp,找到Private Function bbimg(strText,ssize)Dim ss=strTextre.Pattern="
]*)>"If ssize=500 Thens=re.replace(s,"
"& ssize &")this.style.width="&ssize&";"">")Elses=re.replace(s,"
"& ssize &")this.style.width="&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">")End Ifbbimg=sEnd Function修改为Private Function bbimg(strText,ssize)Dim ss=strTextre.Pattern="
]*)>"If ssize=500 Thens=re.replace(s,"
"& ssize &")this.style.width="&ssize&";"">")Elses=re.replace(s,"
"& ssize &")this.style.width="&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">")End Ifbbimg=sEnd 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则为整个页面滚动,图片不缩放!