if str="" then gotTopic="" 什么意思,本人菜鸟越详细越好,拜谢!

[复制链接]
查看11 | 回复0 | 2010-7-3 21:50:46 | 显示全部楼层 |阅读模式
function gotTopic(str,strlen)
if str="" then
gotTopic=""
exit function
end if
dim l,t,c, i
str=replace(replace(replace(replace(str," "," "),""",chr(34)),">",">"),"255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
gotTopic=left(str,i) & "…"
exit for
else
gotTopic=str
end if
next
gotTopic=replace(replace(replace(replace(gotTopic," "," "),chr(34),"""),">",">"),"",">"),"",">"),"<","<")是替换gotTopic里的那些HTML字符,避免别人提交HTML字符,打乱了网页格式。replace:替换,这句话里是将其连着写的,其实也可以分开写。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行