麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

轉換字符串帶有http://的超級鏈接字符串為真正的超級鏈接(源碼)

2019-11-18 22:09:03
字體:
來源:轉載
供稿:網友
Code Title: Auto-linking
Description: How would you like to have every instance of an http:// auto-hyperlink itself to the URL
address that follows it? Well, here is a killer little function that will take every one of those that it
finds in a string and sets up the hyperlink for you! Cool, eh?
Copy and paste this snippet as-is into your editor:

-------------------------------------------------------------------------
<%
Function LinkURLs(strInput)
iCurrentLocation = 1
Do While InStr(iCurrentLocation, strInput, "http://", 1) <> 0
iLinkStart = InStr(iCurrentLocation, strInput, "http://", 1)
iLinkEnd = InStr(iLinkStart, strInput, " ", 1)
If iLinkEnd = 0 Then iLinkEnd = Len(strInput) + 1
Select Case Mid(strInput, iLinkEnd - 1, 1)
Case ".", "!", "?"
iLinkEnd = iLinkEnd - 1
End Select
strOutput = strOutput & Mid(strInput, iCurrentLocation, iLinkStart - iCurrentLocation)
strLinkText = Mid(strInput, iLinkStart, iLinkEnd - iLinkStart)
strOutput = strOutput & "<a href="""&strLinkText&""">"&strLinkText&"</a>"
iCurrentLocation = iLinkEnd
Loop
strOutput = strOutput & Mid(strInput, iCurrentLocation)
LinkURLs = strOutput
End Function
strUnlinked = "http://LINE9.com rules! <br>" & vbCrLf
strUnlinked = strUnlinked & "http://pdxpc.com sells great computers!<br>" & vbCrLf

' Here is the before text:
Response.Write "<b>Original Text:</b><br>" & vbCrLf
Response.Write strUnlinked
Response.Write vbCrLf & "<br>" & vbCrLf & vbCrLf

' Here is the text after it gets automatically hyperlinked to itself:
Response.Write "<b>Text After Linking:</b><br>" & vbCrLf
Response.Write LinkURLs(strUnlinked)
%>
-------------------------------------------------------------------------


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: qyl在线视频精品免费观看 | 亚洲成人免费视频在线 | 天天色狠狠干 | 久草在线小说 | 精品一区二区三区免费爱 | 18pao国产成人免费视频 | 精品在线观看一区二区三区 | 国产日韩精品欧美一区视频 | 久草在线播放视频 | 国产三级在线观看a | 日本在线播放一区二区三区 | 欧美a黄 | 99精品视频在线导航 | 午夜视频在线观看免费视频 | 国内毛片视频 | 男女做性免费网站 | 精品国产一区二区三区久久久蜜 | 亚洲片在线 | 一级做a爱片性色毛片 | 双性帝王调教跪撅打屁股 | 97人操| 国产91影院 | 欧美性激情视频 | 欧美1—12sexvideos| 男女无套免费视频 | 欧美成人免费在线视频 | 成人一级视频 | 91网站免费在线观看 | 亚洲成人中文字幕在线 | 欧美一级全黄 | 久久人人做 | 日韩大片在线永久观看视频网站免费 | 欧美人禽| 91综合影院| 99爱视频在线观看 | 久久成人午夜视频 | 欧美成人精品一级 | 免费人成在线观看网站 | 三级国产三级在线 | 一级黄色免费观看 | 国产成人高清成人av片在线看 |