大家帮看一下,下面函数是什么意思??
哪位大哥能帮写一下注释,小弟看不太明白。。谢谢
function ShowBody(str)
dim Spos,Epos,strURL,tmpStr,tmpPos
Spos=1
str=Replace(str,chr(34),""")
str=Replace(str,"<","<")
str=Replace(str,">",">")
str=Replace(str,chr(13)+chr(10),"<br>")
str=Replace(str,chr(9)," ")
Spos=instr(Spos,str," http://")
if sPos>0 then
str=Replace(str," ","∧")
while (Spos>0)
Spos=instr(Spos,str,"∧http://")
if Spos>0 then
Epos=instr(Spos+1,str,"∧")
if Epos>0 then
strURL=mid(str,Spos+1,Epos-Spos-1)
strURL=lcase(strURL)
if instr(strURL,"gif")>0 or instr(strURL,"jpg")>0 then
strURL="<img src='"+strURL+"' >"
else
strURL="<a class=showdoc href="+chr(34)+strURL+chr(34)+" target=_blank>"+strURL+"</a>"
end if
tmpStr=left(str,Spos-1)+strURL+right(str,len(str)-Epos)
str=tmpstr
end if
spos=spos+5
end if
wend
str=Replace(str,"∧"," ")
else
str=Replace(str," "," ")
end if
showbody=str
end function