WD1X.COM - 问答一下,轻松解决,电脑应用解决专家
主板显卡CPU内存显示器
硬盘维修显卡维修显示器维修
注册表系统命令DOS命令Win8
存储光存储鼠标键盘
内存维修打印机维修
WinXPWin7Win11Linux
硬件综合机箱电源散热器手机数码
主板维修CPU维修键盘鼠标维修
Word教程Excel教程PowerPointWPS
网络工具系统工具图像工具
数据库javascript服务器
PHP教程CSS教程XML教程

彻底去掉动易内容页顶部的“改变图片大小”代码

更新时间:2010-05-24 08:02 作者:whoisqq点击:

当对网站的代码要求越来越高的时候,你就想彻底去掉内容页以下代码

以下内容为程序代码:

<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

然后上传修改过的文件,再回到后台修改内容页的模版看看,是不是不会自动加入任何代码了呢? :)

顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
你可能感兴趣的内容