复制代码 代码如下:
function AddSiteURL(ByVal Str) 
  If IsNull(Str) Then 
      AddSiteURL = "" 
      Exit Function  
  End If 
  Dim re 
  Set re=new RegExp 
  With re 
    .IgnoreCase =True 
    .Global=True 
    .Pattern="<img (.*?)src=""(?!(http|https)://)(.*?)""" 
    str = .replace(str,"<img $1src=""" & SiteURL & "$3""") 
    .Pattern="<a (.*?)href=""(?!(http|https|ftp|mms|rstp)://)(.*?)""" 
    str = .replace(str,"<a $1href=""" & SiteURL & "$3""") 
  End With 
  Set re=Nothing 
  AddSiteURL=Str 
End Function
相关文章
最新评论
 站长推荐 正版Windows 10 家庭/专业版,操作系统限时抢购[¥1088→¥248] 站长推荐 Microsoft Office 2016/2019/365 正版最低价仅需[ ¥148元]
大家感兴趣的内容
最近更新的内容
常用在线小工具
