展会信息港展会大全

asp html代码转安全ascii代码
来源:互联网   发布日期:2016-03-01 11:05:23   浏览:1283次  

导读:function DoTrimProperly(str, nNamedFormat, properly, pointed, points) dim strRet strRet = Server.HTMLEncode(str) strRet = replace(strRet, vbcrlf,br) strRet = replace(strRet, vbtab,) if (LEN(strRet) nNamedFormat) Then strRet = LEFT(strRet,...

function DoTrimProperly(str, nNamedFormat, properly, pointed, points)

dim strRet

strRet = Server.HTMLEncode(str)

strRet = replace(strRet, vbcrlf,"<br>")

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, "<", "&lt;")

String = Replace(String, ">", "&gt;")

String = Replace(String, CHR(10) & CHR(10), "<BR><BR>")

String = Replace(String, CHR(10), "<BR>")

FormatStr = String

'End Function

Function FormatStr(String)

on Error resume next

String = Replace(String, " ", " ")

String = Replace(String, CHR(13), "&nbsp")

String = Replace(String, CHR(10) & CHR(10), "<BR><BR>")

String = Replace(String, CHR(10), "<BR>")

String = Replace(String, "<", "&lt;")

String = Replace(String, ">", "&gt;")

FormatStr = String

End Function

赞助本站

人工智能实验室

相关热词: 开发 编程 android

相关内容
AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港