国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

用asp實現網址和郵件地址的轉換函數

2024-05-04 11:01:01
字體:
來源:轉載
供稿:網友
網址和郵件地址的轉換函數
<%
function URLconvert(str) 
convertstr=str
urlLocation=instr(convertstr,"http://")

if (urlLocation=0) and (mailLocation=0) then 
URLconvert=convertstr
exit function
end if

if urlLocation<>0 then
rightstr=str
Do while urlLocation<>urlLocationend
urlLocation=instr(rightstr,"http://")
urlLocationend=InStrRev(rightstr,"http://")
finalstr=finalstr&left(rightstr,urlLocation-1)
midurlstr=mid(rightstr,urlLocation+1,1)
do while (asc(midurlstr)>=45) and (asc(midurlstr)<=126)
loopint=loopint+1
midurlstr=mid(rightstr,urlLocation+loopint,1)
if midurlstr="" then exit do
loop
endURLstr=mid(rightstr,urllocation,loopint)
URLstr="<a href="&endURLstr&">"&endURLstr&"</a>"
rightstr=mid(rightstr,urllocation+loopint)
finalstr=finalstr&URLstr
loopint=1
Loop 
end if
finalstr=finalstr&rightstr

convertstr1=finalstr
finalstr=""
mailLocation=instr(convertstr1,"@")
if mailLocation<>0 then
Do while mailLocation<>mailLocationend
mailLocation=instr(convertstr1,"@")
mailLocationend=InStrRev(convertstr1,"@")
mainmidmailstr=mid(convertstr1,mailLocation+1,1)
midmailstr=mainmidmailstr
do while (asc(midmailstr)>=45) and (asc(midmailstr)<=126)
loopint1=loopint1+1
midmailstr=mid(convertstr1,mailLocation-loopint1,1)
loop
firstSTR=mid(convertstr1,mailLocation-loopint1+1,loopint1-1)

finalstr=finalstr&left(convertstr1,mailLocation-loopint1)

midmailstr1=mainmidmailstr 
do while (asc(midmailstr1)>=45) and (asc(midmailstr1)<=126)
loopint2=loopint2+1
midmailstr1=mid(convertstr1,mailLocation+loopint2,1)
if midmailstr1="" then exit do
loop
secondSTR=mid(convertstr1,mailLocation,loopint2)

endmailstr=firstSTR&secondSTR
mailstr="<a href=mailto:"&endmailstr&">"&endmailstr&"</a>"
finalstr=finalstr&mailstr
convertstr1=mid(convertstr1,maillocation+loopint2)
loopint1=1
loopint2=1
Loop
end if
finalstr=finalstr&convertstr1
URLconvert=finalstr
end function
%> 

您可能感興趣的文章:

ASP用JMail、CDO發送郵件Jmail組件發送郵件之絕對能用的函數asp jmail發郵件 詳細解析asp.net2.0實現郵件發送(測試成功)Jmail 圖文安裝教程 asp在線發送郵件組件ASP.Net郵箱發郵件實例代碼.net jMail郵件發送(含抄送、密送、多發、日志記錄)實例代碼asp.net發郵件的幾種方法匯總Jmail發送郵件與帶附件亂碼解決辦法分享asp.net發送郵件示例分享asp.net發郵件示例asp.net發送郵件實現方法asp+JMAIL實現發送郵件
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 衡阳县| 万安县| 湟中县| 邢台县| 鄂温| 荥阳市| 岑溪市| 和林格尔县| 宿迁市| 龙山县| 轮台县| 淮滨县| 义乌市| 清镇市| 新晃| 陵川县| 汾西县| 泗洪县| 江华| 安顺市| 大关县| 微博| 巴青县| 甘孜县| 鄢陵县| 梨树县| 图木舒克市| 吐鲁番市| 华亭县| 荆门市| 巴彦淖尔市| 喀喇沁旗| 颍上县| 日喀则市| 岳阳县| 信宜市| 红安县| 溧水县| 古交市| 和硕县| 新乡市|