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:替换,这句话里是将其连着写的,其实也可以分开写。 |