可以模仿QQ空间里有图片的话就在标题后显示有附件的图片
ASP/Visual Basic代码:
程序代码
<%
'***************************************************
'*函数名 : GetImgFromContent
'*参数说明 : html 被提取的html 代码
'*功能简介 : 提取这部分html代码中的图片
'*程序作者 : evio http://www.backci.cn/code
'*http://www.downcodes.com/
'***************************************************
function GetImgFromContent(html)
Dim Re, match, matchs, htm, t
htm = ""
set Re = new RegExp
re***noreCase =True
re***obal = True
re***ttern = "]*>" '--]*>
Set matchs = re***ecute(html)
for each match in matchs
htm = htm + (ma***.SubMatches(0)) & "|$|"
next
set matchs = nothing
t = split(htm, "|$|")(0)
if len(t) = 0 or t = "" then
t = "_template_Images/prive.jpg"
end if
ze = ""
end function
%>
下一篇: ASP Dictionary对象使用小结