45IT.COM- 电脑学习从此开始!
DIY硬件教程攒机经验装机配置
设计Photoshop网页设计特效
系统注册表DOS系统命令其它
存储主板显卡外设键鼠内存
维修显卡CPU内存打印机
WinXPVistaWin7unix/linux
CPU光驱电源/散热显示器其它
修技主板硬盘键鼠显示器光驱
办公ExcelWordPowerPointWPS
编程数据库CSS脚本PHP
网络局域网QQ服务器
软件网络系统图像安全
页面导航: 首页 > 设计学院 > 网页设计 >

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

电脑软硬件应用网 45IT.COM 时间: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%
------分隔线----------------------------
无法在这个位置找到: baidushare.htm
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
验证码:点击我更换图片
你可能感兴趣的文章
推荐知识