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

ASP
ASP中通过该日历算法实现的具体代码
ASP类编写详细说明
一个简单的asp数据库操作类
一个asp快速字符串连接类
ByVal和ByRef(编写ASP子程序所用到命令)
FSO一些代码
ASP连接11种数据库语法总结
代码与页面的分离
ASP 类专题
直接保存URL图像或网页到服务器本地的类
[原创]关于Script的Defer属性
[ASP]使用类,实现模块化
在VBScript中使用类
浅谈ASP中的类
ASP中一个用VBScript写的随机数类
文件、目录,文本文件等多种操作类
Object对象的一些的隐藏函数介绍
ASP高亮类
叶子asp分页类
遭遇ASP类的事件设计

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 73 ::
收藏到网摘: 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
%>