Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

VBScript Chr function


May 13, 2021 VBScript


Table of contents


VBScript Chr function

The VBScript Chr function returns the character that specifies the ANSI character code.


VBScript Chr function Complete VBScript reference manual

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

Note: Numbers between 0 and 31 represent unprintable ASCII codes, such as Chr(10), which returns a line break.

Grammar

Chr(charcode)

Parameters

parameter describe
charcode Required.Identify the number of a character.

Instance 1

<script type="text/vbscript">

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

</script>

The above example output results:

A
B
C
a
b
c

Try it out . . .

Instance 2

<script type="text/vbscript">

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

</script>

The above example output results:

"
#
$
%

Try it out . . .

VBScript Chr function Complete VBScript reference manual

Refer to the article

HTML ASCII Reference Manual