通过本文主要向大家介绍了vbs无效字符,vbs 字符,vbs 替换字符,vbs 字符转换,vbs显示文字等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
vbs:把一段文字中指定字符颜色变成红色的正则
function c(Tstr,Word)
Dim re
Set re = new RegExp
re.IgnoreCase =True
re.Global=True
re.pattern = "("&Word&")"
c=re.replace(Tstr,"<font style='color:red;'>$1</font>")
End function
调用方法
response.write c("内容字串","要显示为红色的字")
比如
<%
function c(Tstr,Word)
Dim re
Set re = new RegExp
re.IgnoreCase =True
re.Global=True
re.pattern = "("&Word&")"
c=re.replace(Tstr,"<font style='color:red;'>$1</font>")
End function
Response.write("lamking.com","a")
%>
就把lamking.com中的a替换为红色的。 </div>
function c(Tstr,Word)
Dim re
Set re = new RegExp
re.IgnoreCase =True
re.Global=True
re.pattern = "("&Word&")"
c=re.replace(Tstr,"<font style='color:red;'>$1</font>")
End function
调用方法
response.write c("内容字串","要显示为红色的字")
比如
<%
function c(Tstr,Word)
Dim re
Set re = new RegExp
re.IgnoreCase =True
re.Global=True
re.pattern = "("&Word&")"
c=re.replace(Tstr,"<font style='color:red;'>$1</font>")
End function
Response.write("lamking.com","a")
%>
就把lamking.com中的a替换为红色的。 </div>