<%
'****************************************************
'页面字符串过滤函数,返回值
'作者:www.joekoe.com论坛用户(cuiwl)
'****************************************************
function codehtml(str,n1,n2)
'str字符串参数
'n1过滤等级
'n2显示数目
if trim(str)="" then
str=str
else
select case n1
case 0
'不过滤
str=str
case 1
'过滤脚本标记
str=replace(str,"<script","<script")
str=replace(str,"script>","script>")
case 2
'过滤html标记
str=replace(str,"<","<")
str=replace(str,">",">")
end select
select case n2
case 0
'显示全部
str=str
case else
'显示部分
if len(str)<=n2 then
str=str
else
str=left(str,n2-1)&".."
end if
end select
codehtml=str
end function
%>