<% '========================================= '函数名:Nkey '作 用:关键字高亮 '参 数:Key ---- 关键字 title标题 '用 法:Nkey(“关键字”,“标题”) '========================================= Function Nkey(Key,title) Dim LenKey,i,newkey LenKey=Len(Key) For i=1 To LenKey NewKey=Mid(Key,i,1) title=replace(title,NewKey,"<font color=red><b>"&NewKey&"</b></font>") Next Response.Write title End Function %>
<% word = "热雨,落伍,网站" hotlt="热雨欢迎落伍的兄弟到他的网站" title=Nkey(word,hotlt) %> |