请问大哥这段asp代码的chr是啥意思呀?

来源:百度知道 编辑:UC知道 时间:2024/06/29 01:13:52
这句的chr(13),chr(10),chr(32)俺不懂?chr()括号里的数字是啥意思呢?
整段代码是
<%
function htmlcode(fstring)
if not isnull(fstring) then
fstring=replace(fstring,chr(13),"")
fstring=replace(fstring,chr(10)&chr(10),"</p><p>")
fstring=replace(fstring,chr(10),"<br>")
fstring=replace(fstring,chr(32)," ")
htmlcode=fstring
end if
end function
%>

Chr 是 VBS 中的一个函数

返回 String,其中包含有与指定的字符代码相关的字符 。

语法

Chr(charcode)

必要的 charcode 参数是一个用来识别某字符的 Long。

说明

0 到 31 之间的数字与标准的非打印 ASCII 代码相同。例如,Chr(10) 可以返回换行字符。charcode 的正常范围为 0 – 255。然而,在 DBCS 系统,charcode 的实际范围为 -32768 到 65535。

注意 ChrB 函数作用于包含在 String 中的字节数据。ChrB 总是返回一个单字节,而不是返回一个字符,一个字符可能是一个或两个字节。ChrW 函数返回包含 Unicode 的 String,若在不支持 Unicode 的平台上,则其功能与 Chr 函数相同。

把ASCII码转为字符

10,13都是转行
32是空格