主题:一起研究
//我研究了好久没看懂 那为大哥给我写个注释 谢谢了
<%
function TagSummary(v_string, byVal v_item)
dim d1,d2,d3,d4,d5
dim d_item1,d_item2
dim d_string,d_string1,d_string2
d_string=left(v_string,256)
select case lcase(left(v_item,5))
case "link:"
case "site:"
case else
if lcase(left(v_item,4)) <> "url:" then
d1=instr(1,v_item," ")
if d1=0 then
d_item1=v_item
d2=instr(1,v_string,d_item1)-10
if d2<=0 then
d2=1
end if
d_string=mid(v_string,d2,256)
d_string=replace(d_string,d_item1,"<b><font color=red>" & d_item1 & "</font></b>")
else
d_item1=trim(left(v_item,d1-1))
d3=instr(d1+1,v_item," ")
if d3>0 then
d_item2=trim(mid(v_item,d1+1,d3-d1-1))
else
d_item2=trim(mid(v_item,d1+1))
end if
d4=instr(1,v_string,d_item1)-10
if d4<=0 then
d4=1
end if
d5=instr(1,v_string,d_item2)-10
if d5<=0 then
d5=1
end if
d_string1=mid(v_string,d4,128)
d_string1=replace(d_string1,d_item1,"<b><font color=red>" & d_item1 & "</font></b>")
d_string2=mid(v_string,d5,128)
d_string2=replace(d_string2,d_item2,"<b><font color=red>" & d_item2 & "</font></b>")
if d4<d5 then
d_string=d_string1 & "......" & d_string2
else
d_string=d_string2 & "......" & d_string1
end if
end if
end if
end select
TagSummary = d_string
end function
%>