Recommended: Common functions for ASP: getIMG() There are still bugs at present. The latest test page is: http://www.reallydo.com/getimg.asp The regular analysis page is: http://jorkin.reallydo.com/article.asp?id=380 If you find the bug, please leave a message later. Thank you. 1.31 Fixed src=The spaces behind cannot match correctly. Fixed. An error occurred when src='' is empty. Fixed. BUG found: There are multiple image paths.
Program code
<%
'Function: Output string plus line break
'Source: http://www.cncms.com/asp.asp
Function WriteLn(sString)
Response.Write( sString & vbCrLf )
End Function
%>
Program code
<%
'Function: Output string plus HTML code<br />
'Source: http://www.cncms.com/asp.asp
Function PRintLn(sString)
Response.Write( sString & vbCrLf & <br /> & vbCrLf)
End Function
%>
Share: ASP tagged strings specify that they are case-insensitive The ordinary replacement function code is as follows: public function HighLight(S,F) dim tL,tM,tR,k tL= tM= tR=S k=instr(1,tR,F,1) do while k0 tL=tL left(tR,k-1) tM=mid(tR,k,len(F)) tL=tL span style='color:red' tM /span tR=right(tR,Len(tR)-len(F)-k+1) k=instr(1,tR,F,1) loop Hig