Function getimgsrc(str)
dim tagnum,tagnums,imgtag
getimgsrc=""
str=Replace(str,"""",chr(32))
str=Replace(str,">",chr(32)&"end")
'response.write str
Set imgtag = New Regexp'设置配置对象
imgtag.IgnoreCase = True '忽略大小写
imgtag.Global = True '设置为全文搜索
imgtag.Pattern = "<img.+?"&chr(32)&"end"'首先找到里面的<img.src>属性
strs=trim(str)
Set tagnums =imgtag.Execute(strs) '开始执行配置
For Each tagnum in tagnums
if tagnum.Value<>"" then
getimgsrc = getimgsrc&getsrcs(tagnum.Value) '执行第二轮的匹配
end if
Next
End Function
Function getsrcs(str)
dim srcnum,srcnums,imgsrc
getsrcs=""
Set imgsrc = New Regexp
imgsrc.IgnoreCase = True
imgsrc.Global = True
imgsrc.Pattern = "http://.+?"&chr(32) '取出里面的地址
set srcnums=imgsrc.Execute(str)
For Each srcnum in srcnums
if srcnum.Value<>"" then
getsrcs=getsrcs&"<p><img src="""&left(srcnum.Value,len(srcnum.Value)-1)&""" οnlοad=""DrawImage(this);"" οnclick=""OpenImage(this);""></p>"&VbCrLf '把里面的地址串起来备用
end if
next
End Function
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>
dim tagnum,tagnums,imgtag
getimgsrc=""
str=Replace(str,"""",chr(32))
str=Replace(str,">",chr(32)&"end")
'response.write str
Set imgtag = New Regexp'设置配置对象
imgtag.IgnoreCase = True '忽略大小写
imgtag.Global = True '设置为全文搜索
imgtag.Pattern = "<img.+?"&chr(32)&"end"'首先找到里面的<img.src>属性
strs=trim(str)
Set tagnums =imgtag.Execute(strs) '开始执行配置
For Each tagnum in tagnums
if tagnum.Value<>"" then
getimgsrc = getimgsrc&getsrcs(tagnum.Value) '执行第二轮的匹配
end if
Next
End Function
Function getsrcs(str)
dim srcnum,srcnums,imgsrc
getsrcs=""
Set imgsrc = New Regexp
imgsrc.IgnoreCase = True
imgsrc.Global = True
imgsrc.Pattern = "http://.+?"&chr(32) '取出里面的地址
set srcnums=imgsrc.Execute(str)
For Each srcnum in srcnums
if srcnum.Value<>"" then
getsrcs=getsrcs&"<p><img src="""&left(srcnum.Value,len(srcnum.Value)-1)&""" οnlοad=""DrawImage(this);"" οnclick=""OpenImage(this);""></p>"&VbCrLf '把里面的地址串起来备用
end if
next
End Function
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>