当前位置: 首页 > 图文教程 > 网络编程 > ASP > CHR(10)表示换行,CHR(13)表示回车,CHR(32)表示空格

ASP
统计在线人数 dxy
ASP 写的自动生成SELECT 表单的函数
自己做采集程序
巧用缓存提高asp程序的性能
多字段模糊搜索的函数
打包上传asp网站
FreeTextBox 中文版下载[含源代码] of asp.net
asp 防止SQL注入代码
asp实现无限级分类的方法js版
多附件上传组件演示
替换数据库内容
E-mail表单递交
也谈采集入库的技术
先锋海盗类
XML相关技术资料
让ASP搭配MYSQL
ASP远程保存图片
整理了下手动注入脚本命令[带注释]
也谈跨站脚本攻击与防御
突破空格的限制

ASP 中的 CHR(10)表示换行,CHR(13)表示回车,CHR(32)表示空格


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 66 ::
收藏到网摘: n/a

<%
function th(str)
str=replace(str,"妈的","MD")
str=replace(str,"靠","KAO")
th=str
end function
function encode(str)
str = replace(str, ">", ">")
str = replace(str, "<", "<")
str = Replace(str, CHR(32), " ")
str = Replace(str, CHR(13), "")
str = Replace(str, CHR(10) & CHR(10), "</P><P>")
str = Replace(str, CHR(10), "<BR>")
encode=str
end function
%>
<%title=request.form("title")
content=request.form("content")%>
文章标题:<%=th(title)%><hr>
文章内容:<%=encode(th(content))%>

th(str)为自定义函数,主要功能很简单:过滤字符。encode(str)也为自定义函
数,主要功能是完整地显示被传递的信息。
CHR(10)表示换行,CHR(13)表示回车,CHR(32)表示空格。
附加功能:显示UBB代码。
即ubb.asp中含有ubb()函数。
增强的cnbruce.asp
<!--#include file="http://www.cnbruce.com/blog/ubb.asp"-->
<%
function th(str)
str=replace(str,"妈的","MD")
str=replace(str,"靠","KAO")
th=str
end function
%>