<% 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> 文章內(nèi)容:<%=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> 文章內(nèi)容:<%=ubb(unhtml(th(content)))%> |
expression 必選項。字符串表達式包含要替代的子字符串。 find 必選項。被搜索的子字符串。 replacewith 必選項。用于替換的子字符串。 start 可選項。expression中開始搜索子字符串的位置。如果省略,默認值為1。在和count關聯(lián)時必須用. count 可選項。執(zhí)行子字符串替換的數(shù)目。如果省略,默認值為-1,表示進行所有可能的替換。在和start關聯(lián)時必須用。 compare 可選項。指示在計算子字符串時使用的比較類型的數(shù)值。有關數(shù)值,請參閱"設置"部分。如果省略,缺省值為0 ,這意味著必須進行二進制比較。 |