当对网站的代码要求越来越高的时候,你就想彻底去掉内容页以下代码
以下内容为程序代码:
<script language="JavaScript"> <!-- //改变图片大小 function resizepic(thispic) { return true; } //无级缩放图片大小 function bbimg(o) { return true; } --> </script>
教程的方法是:
找到Admin\Admin_Template.asp 第3859行 ,把以下代码:
以下内容为程序代码:
'解决正文页用户删除图片js 问题 strPhotoJs = "<script language=""JavaScript"">" & vbCrLf strPhotoJs = strPhotoJs & "<!--" & vbCrLf strPhotoJs = strPhotoJs & "//改变图片大小" & vbCrLf strPhotoJs = strPhotoJs & "function resizepic(thispic)" & vbCrLf strPhotoJs = strPhotoJs & "{" & vbCrLf 'strPhotoJs = strPhotoJs & "if(thispic.width>700) thispic.width=700;" & vbCrLf strPhotoJs = strPhotoJs & " return true;" & vbCrLf strPhotoJs = strPhotoJs & "}" & vbCrLf strPhotoJs = strPhotoJs & "//无级缩放图片大小" & vbCrLf strPhotoJs = strPhotoJs & "function bbimg(o)" & vbCrLf strPhotoJs = strPhotoJs & "{" & vbCrLf 'strPhotoJs = strPhotoJs & " var zoom=parseInt(o.style.zoom, 10)||100;" & vbCrLf 'strPhotoJs = strPhotoJs & " zoom+=event.wheelDelta/12;" & vbCrLf 'strPhotoJs = strPhotoJs & " if (zoom>0) o.style.zoom=zoom+'%';" & vbCrLf strPhotoJs = strPhotoJs & " return true;" & vbCrLf strPhotoJs = strPhotoJs & "}" & vbCrLf strPhotoJs = strPhotoJs & "-->" & vbCrLf strPhotoJs = strPhotoJs & "</script>" & vbCrLf strPhotoJs = strPhotoJs & "</head>" & vbCrLf If TemplateType = 3 Then If InStr(Content, "resizepic(thispic)") <= 0 Or InStr(Content, "bbimg(o)") <= 0 Then Content = Replace(Content, "</head>", strPhotoJs) End If End If
替换为:
以下内容为程序代码:
strPhotoJs = strPhotoJs & "</head>" & vbCrLf
然后上传修改过的文件,再回到后台修改内容页的模版看看,是不是不会自动加入任何代码了呢? :)
|