ASP常用函数收藏乱七八糟未整理版(63)
CODE Copy ...
Dim result
Dim l
If IsNull(Str) Then
Htmlout = ""
Exit Function
End If
l = Len(Str)
result = ""
Dim i
For i = 1 To l
Select Case Mid(Str, i, 1)
Case "<"
result = result + "<"
Case ">"
result = result + ">"
Case Chr(13)
If session("admin_system") = "" Then
result = result + "<br>"
End If
Case Chr(34)
result = result + """
Case "&"
result = result + "&"
Case Chr(32)
‘'result = result + " "
If i + 1<= l And i -1>0 Then
If Mid(Str, i + 1, 1) = Chr(32) or Mid(Str, i + 1, 1) = Chr(9) or Mid(Str, i -1, 1) = Chr(32) or Mid(Str, i -1, 1) = Chr(9) Then
result = result + " "
Else
result = result + " "
End If
Else
result = result + " "
内容版权声明:除非注明,否则皆为本站原创文章。