VBScript Chr 함수

❮ 완전한 VBScript 참조

Chr 함수는 지정된 ANSI 문자 코드를 문자로 변환합니다.

참고: 0에서 31 사이의 숫자는 인쇄할 수 없는 ASCII 코드를 나타냅니다. 즉, Chr(10)은 줄 바꿈 문자를 반환합니다.

통사론

Chr(charcode)
Parameter Description
charcode Required. A number that identifies a character

실시예 1

<%

response.write(Chr(65) & "<br />")
response.write(Chr(66) & "<br />")
response.write(Chr(67) & "<br />")
response.write(Chr(97) & "<br />")
response.write(Chr(98) & "<br />")
response.write(Chr(99) & "<br />")

%>

위 코드의 출력은 다음과 같습니다.

A
B
C
a
b
c

실시예 2

<%

response.write(Chr(34) & "<br />")
response.write(Chr(35) & "<br />")
response.write(Chr(36) & "<br />")
response.write(Chr(37) & "<br />")

%>

위 코드의 출력은 다음과 같습니다.

"
#
$
%

❮ 완전한 VBScript 참조