Næste
Forrige
Oversigt
JavaScript "Core Language" serie, Planche nr. 11
Kursus Indhold

String-konstanter

Består at tekster i matchene "" eller ''. Specialtegn angives med \ foran:
Character Meaning
\b

Backspace

\f

Form feed

\n

New line

\r

Carriage return

\t

Tab

\'

Apostrophe or single quote

\"

Double quote

\\

Backslash character (\)

\XXX

The character with the Latin-1 encoding specified by up to three octal digits XXX between 0 and 377. For example, \251 is the octal sequence for the copyright symbol.

\xXX

The character with the Latin-1 encoding specified by the two hexadecimal digits XX between 00 and FF. For example, \xA9 is the hexadecimal sequence for the copyright symbol.

\uXXXX

The Unicode character specified by the four hexadecimal digits XXXX. For example, \u00A9 is the Unicode sequence for the copyright symbol. See "Unicode Escape Sequences" on page 43.


© 1999 BLA*net - Leif E. Andersen, leander@blanet.dk