Funzione Chr VBScript
❮ Riferimento completo di VBScriptLa funzione Chr converte il codice carattere ANSI specificato in un carattere.
Nota: i numeri da 0 a 31 rappresentano codici ASCII non stampabili, ovvero Chr(10) restituirà un carattere di avanzamento riga.
Sintassi
Chr(charcode)
Parameter | Description |
---|---|
charcode | Required. A number that identifies a character |
Esempi
Esempio 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 />")
%>
L'output del codice sopra sarà:
A
B
C
a
b
c
Esempio 2
<%
response.write(Chr(34) & "<br />")
response.write(Chr(35) & "<br />")
response.write(Chr(36) & "<br />")
response.write(Chr(37) & "<br />")
%>
L'output del codice sopra sarà:
"
#
$
%
❮ Riferimento completo di VBScript