网址和邮件地址的转换函数
<%
FunctionUrlConvert (STR)
Convertstr = STR
urllocation = instr (convertstr, "http: //")
if (urllocation = 0) y (maillocation = 0) entonces
UrlConvert = convertstr
extinción
endif
ifurllocation <> 0then
Rightstr = STR
Dowhileurllocation <> urllocationend
urllocation = instr (rightstr, "http: //")
urllocationend = instrrev (rightstr, "http: //")
FinalStr = FinalStr & Left (Rightstr, Urllocation-1)
MidUrlstr = Mid (Rightstr, Urllocation+1,1)
Dowhile (ASC (Midurlstr)> = 45) y (ASC (Midurlstr) <= 126)
LoopInt = LoopInt+1
MidUrlStr = Mid (Rightstr, Urllocation+Loopint, 1)
ifmidurlStr = "" thenexitdo
bucle
endurlStr = Mid (Rightstr, Urllocation, Loopint)
Urlstr = "<ahref =" & endurlstr & ">" & endurlstr & "</a>"
Rightstr = Mid (Rightstr, Urllocation+Loopint)
FinalStr = FinalStr y Urlstr
LoopInt = 1
Bucle
endif
FinalStr = FinalStr y Rightstr
Convertstr1 = FinalStr
finaltr = ""
maillocation = instr (convertstr1, "@")
ifmaillocation <> 0then
Dowhilemaillocation <> maillocationend
maillocation = instr (convertstr1, "@")
maillocationend = instrrev (convertstr1, "@")
MainMidMailstr = Mid (Convertstr1, Maillocation+1,1)
midmailstr = mainmidmailstr
Dowhile (ASC (Midmailstr)> = 45) y (ASC (Midmailstr) <= 126)
LoopInt1 = LoopInt1+1
Midmailstr = Mid (Convertstr1, Maillocation-Loopint1,1)
bucle
FirstStr = Mid (Convertstr1, Maillocation-LoopInt1+1, LoopInt1-1)
FinalStr = FinalStr & Left (Convertstr1, Maillocation-LoopInt1)
midmailstr1 = mainmidmailstr
Dowhile (ASC (MidMailstr1)> = 45) y (ASC (MidMailstr1) <= 126)
LoopInt2 = LoopInt2+1
MidMailStr1 = Mid (Convertstr1, Maillocation+LoopInt2,1)
ifMidMailStr1 = "" entoncesxitdo
bucle
SecondStr = Mid (ConvertStr1, Maillocation, LoopInt2)
endmailstr = FirstStr & Secondstr
mailstr = "<ahref = mailto:" & endmailstr & ">" & endmailstr & "</a>"
FinalStr = FinalStr & MailstrS
ConvertStr1 = Mid (Convertstr1, Maillocation+LoopInt2)
LoopInt1 = 1
LoopInt2 = 1
Bucle
endif
FinalStr = FinalStr & Convertstr1
Urlconvert = final
Función final
%>