一段asp高亮关键字代码
<P><STRONG><%<BR>'================================================== <BR>'函数名:Nkey<BR>'作 用:关键字高亮 <BR>'参 数:Key ---- 关键字 title标题<BR>'用 法:Nkey(“关键字”,“标题”)<BR>'================================================== <BR>Function Nkey(Key,title)<BR>Dim LenKey,i,newkey<BR>LenKey=Len(Key)<BR> For i=1 To LenKey<BR> NewKey=Mid(Key,i,1)<BR> title=replace(title,NewKey,"<font color=red>"&NewKey&"</font>")<BR> Next<BR>Response.Write title<BR>End Function<BR>%></STRONG></P><P><STRONG><%<BR>word = "凹丫丫,</STRONG><FONT color=#800080><STRONG>网站</STRONG></FONT><STRONG>"<BR>hotlt="</STRONG>凹丫丫<FONT color=#800080><STRONG>网站</STRONG></FONT><STRONG>"<BR>title=Nkey(word,hotlt)<BR>%></STRONG></P> 以前还到处找的东西
页:
[1]