<%
Function coder(str)
Dim result,L,i
If IsNull(str) Then : coder="" : Exit Function : End If
L=Len(str) : result=""
For i = 1 to L
select case mid(str,i,1)
case "<" : result=result+"<"
case ">" : result=result+">"
case chr(34) : result=result+"""
case "&" : result=result+"&"
case chr(13) : result=result+"<br>"
case chr(9) : result=result+" "
case chr(32) : result=result+" "
case else : result=result+mid(str,i,1)
end select
Next
coder=result
End Function
%>
用这个字定义函数 就可以了
Function coder(str)
Dim result,L,i
If IsNull(str) Then : coder="" : Exit Function : End If
L=Len(str) : result=""
For i = 1 to L
select case mid(str,i,1)
case "<" : result=result+"<"
case ">" : result=result+">"
case chr(34) : result=result+"""
case "&" : result=result+"&"
case chr(13) : result=result+"<br>"
case chr(9) : result=result+" "
case chr(32) : result=result+" "
case else : result=result+mid(str,i,1)
end select
Next
coder=result
End Function
%>
用这个字定义函数 就可以了
http://www./