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

首頁 > 編程 > ASP > 正文

asp下去除超鏈接的函數

2024-05-04 11:00:25
字體:
來源:轉載
供稿:網友

復制代碼 代碼如下:
<%
Function ReplaceUrl2(HTMLstr)
Dim n,str1,str2,str3,str4
HTMLstr = Lcase(HTMLstr)
For n=1 to Ubound(Split(HTMLstr,"<a"))
str1 = Instr(HTMLstr,"<a")
str2 = Instr(str1,HTMLstr,">")
HTMLstr = left(HTMLstr,str1-1)&right(HTMLstr,len(HTMLstr)-len(left(HTMLstr,str2)))
HTMLstr = replace (HTMLstr,"</a>","")
ReplaceUrl2 = HTMLstr
Next
End Function
%>


正則表達式去除鏈接:

復制代碼 代碼如下:
Function RegRemoveHref(HTMLstr)
Set ra = New RegExp
ra.IgnoreCase = True
ra.Global = True
ra.Pattern = "<A[^>]+>(.+?)<//A>"
RegRemoveHref = ra.replace(HTMLstr,"$1")
END Function

您可能感興趣的文章:

js 取消超鏈接的方法小結
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 资阳市| 兰西县| 嘉峪关市| 汉沽区| 石阡县| 武夷山市| 牙克石市| 舒城县| 汝南县| 图片| 廊坊市| 黄陵县| 阜宁县| 广昌县| 台东市| 新源县| 简阳市| 富裕县| 高尔夫| 晋江市| 越西县| 宜兰市| 自治县| 安义县| 连州市| 营山县| 陇川县| 滦平县| 竹溪县| 辉县市| 永康市| 昌邑市| 遂昌县| 黄浦区| 奈曼旗| 柳州市| 红原县| 西吉县| 翁牛特旗| 阜南县| 阿鲁科尔沁旗|