Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

VBScript Chr Function

❮ Complete VBScript Reference

The Chr function converts the specified ANSI character code to a character.

Note: The numbers from 0 to 31 represents nonprintable ASCII codes, i.e. Chr(10) will return a linefeed character.

Syntax

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

Examples

Example 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 />")

%>

The output of the code above will be:

A
B
C
a
b
c
Show Example »

Example 2

<%

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

%>

The output of the code above will be:

"
#
$
%
Show Example »

❮ Complete VBScript Reference