<% function HTMLEncode(fString) fString = replace(fString, ">", ">") fString = replace(fString, "<", "<") fString = Replace(fString, CHR(32), " ") fString = Replace(fString, CHR(13), "") fString = Replace(fString, CHR(10) & CHR(10), "</P><P>") fString = Replace(fString, CHR(10), "<BR>") HTMLEncode = fString end function %> |
<%=HTMLEncode(rs("content"))%> |
<form action="cnbruce.asp" method="post"> <input type="text" name="title"><br> <textarea name="content" rows=10 cols=20></textarea><br> <input type="submit"> </form> |
<% 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))%> |
<!--#include file="http://www.cnbruce.com/blog/ubb.asp"--> <% function th(str) str=replace(str,"妈的","MD") str=replace(str,"靠","KAO") th=str end function %> <script> function runEx(cod1) { cod=document.all(cod1) var code=cod.value; if (code!=""){ var newwin=window.open('','',''); newwin.opener = null newwin.document.write(code); newwin.document.close(); } } </script> <%title=request.form("title") content=request.form("content")%> 文章标题:<%=th(title)%><hr> 文章内容:<%=ubb(unhtml(th(content)))%> |
expression 必选项。字符串表达式包含要替代的子字符串。 find 必选项。被搜索的子字符串。 replacewith 必选项。用于替换的子字符串。 start 可选项。expression中开始搜索子字符串的位置。如果省略,默认值为1。在和count关联时必须用. count 可选项。执行子字符串替换的数目。如果省略,默认值为-1,表示进行所有可能的替换。在和start关联时必须用。 compare 可选项。指示在计算子字符串时使用的比较类型的数值。有关数值,请参阅"设置"部分。如果省略,缺省值为0 ,这意味着必须进行二进制比较。 |
联系客服