asp中我想把数据库中查找出来的数据变个颜色怎么做啊?谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/02 05:49:44
asp中我想把从数据库中查找出来的个别字符变个颜色
怎么做啊?谢谢啦高手
那asp版的呢

<%
public function keywordlight(l1,l2)
dim bads,I1,I2,I3,i
if len(l1)>0 and len(l2)>0 then
I1=l1
I2=split(l2,",")
set I3=new regexp
I3.global=true
I3.ignorecase=true
for i=0 to ubound(I2)
if len(trim(I2(i)))>0 then
I3.pattern="("&I2(i)&")"
I1=I3.replace(I1,"<font color=red>$1</font>")
end if
next
keywordlight=I1
set I3=nothing
end if
end function

Response.Write keywordlight("Web技术文章中心","Web,技术文章中心")