最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp html代码转安全ascii代码
时间:2009-09-16 编辑:简简单单 来源:一聚教程网
asp html代码转安全ascii代码
function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
dim strRet
strRet = Server.HTMLEncode(str)
strRet = replace(strRet, vbcrlf,"
")
strRet = replace(strRet, vbtab,"")
if (LEN(strRet) > nNamedFormat) Then
strRet = LEFT(strRet, nNamedFormat)
if (properly = 1) Then
Dim TempArray
TempArray = split(strRet, " ")
Dim n
strRet = ""
for n = 0 to Ubound(TempArray) - 1
strRet = strRet & " " & TempArray(n)
next
End if
if (pointed = 1) Then
strRet = strRet & points
End if
End if
DoTrimProperly = strRet
End Function
'Function FormatStr(String)
'on Error resume next
'String = Replace(String, CHR(13), "")
'String = Replace(String, "<", "<")
'String = Replace(String, ">", ">")
'String = Replace(String, CHR(10) & CHR(10), "
")
'String = Replace(String, CHR(10), "
")
' FormatStr = String
'End Function
Function FormatStr(String)
on Error resume next
String = Replace(String, " ", " ")
String = Replace(String, CHR(13), " ")
String = Replace(String, CHR(10) & CHR(10), "
")
String = Replace(String, CHR(10), "
")
'String = Replace(String, "<", "<")
'String = Replace(String, ">", ">")
FormatStr = String
End Function
-
上一个: asp智能给内容加地址代码
-
下一个: asp 判断数字是否整形
相关文章
- asp ubb代码转换成html代码 09-16
- 巧用ASP技术保护DHTML源代码(转) 01-12
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16