标题: ASP网页设计很不错的一个UBB代码 [打印本页] 作者: 因胸联盟 时间: 2015-2-3 23:30 标题: ASP网页设计很不错的一个UBB代码 写软件都是想的时间比写的时间要长的.如果反过来了就得看看是什么原因了. 另外大家可以回去问问公司里的小MM.(一般企业里,跟你们交付软件接触得最多的是她们)ubb <%
Function HTMLEncode(ByVal strValue)
'疏忽毛病
On Error Resume Next
'界说变量
Dim strNewValue
If strValue <> "" Then
strNewValue = WordStr(strValue,"<","<")
strNewValue = WordStr(strNewValue,">",">")
strNewValue = WordStr(strNewValue,"'","'")
strNewValue = WordStr(strNewValue,"""",""")
strNewValue = WordStr(strNewValue,vbCrLf,"<br>")
strNewValue = WordStr(strNewValue," "," ")
End If
HTMLEncode = strNewValue
'输入毛病
If Err.Number>0 Then
Response.Write Err.Description
Response.End
End If
End Function
Function UBBCode(strValue)
Dim RegExp
'strValue=HTMLEncode(strValue)
Set RegExp=New RegExp
RegExp.IgnoreCase =True
RegExp.Global=True
If strValue <> "" Then
RegExp.Pattern="(\[IMG\])(.[^\[]*)(\[\/IMG\])"
strValue=RegExp.WordStr(strValue,"<a href=""$2"" target=_blank><IMG SRC=""$2"" border=0 alt=按此在新窗口阅读图片 javascript:if(this.width>screen.width-333)this.width=screen.width-333""></a>")