Javascript 八进制转义字符(8进制)
在JavaScript中,可以使用八进制转义字符来表示特定的字符,这些转义字符以反斜杠(\)开头,后跟一个介于0到7之间的数字。1
代表ASCII码为65的字符'A'。
表格:常见的八进制转义字符
转义字符 | 描述 | ASCII值 | 对应字符 |
\0 | NUL | 0 | |
\1 | SOH | 1 | |
\2 | STX | 2 | |
\3 | ETX | 3 | |
\4 | EOT | 4 | |
\5 | ENQ | 5 | |
\6 | ACK | 6 | |
\7 | BEL | 7 | \a |
\10 | 换行符 | 8 | ` |
` |
| \11 | 垂直制表符 | 9 |\v
|
| \12 | 水平制表符 | 10 |\t
|
| \13 | 回车符 | 11 |\r
|
| \14 | SOH | 12 | |
| \15 | STX | 13 | |
| \16 | ETX | 14 | |
| \17 | EOT | 15 | |
| \20 | 空格 | 16 | |
| \21 | ! | 17 |!
|
| \22 | " | 18 |"
|
| \23 | # | 19 |#
|
| \24 | $ | 20 |$
|
| \25 | % | 21 |%
|
| \26 | & | 22 |&
|
| \27 | ' | 23 |'
|
| \30 | ( | 24 |(
|
| \31 | ) | 25 |)
|
| \32 | * | 26 | |
| \33 | + | 27 |+
|
| \34 | , | 28 |,
|
| \35 | | 29 | |
| \36 | . | 30 |.
|
| \37 | / | 31 |/
|
| \40 | 0 | 32 |0
|
| \41 | 1 | 33 |1
|
| \42 | 2 | 34 |2
|
| \43 | 3 | 35 |3
|
| \44 | 4 | 36 |4
|
| \45 | 5 | 37 |5
|
| \46 | 6 | 38 |6
|
| \47 | 7 | 39 |7
|
| \50 | 8 | 40 |8
|
| \51 | 9 | 41 |9
|
| \52 | : | 42 |:
|
| \53 | ; | 43 |;
|
| \54 | < | 44 |<
|
| \55 | = | 45 |=
|
| \56 | > | 46 |>
|
| \57 | ? | 47 |?
|
| \60 | @ | 48 |@
|
| \61 | A | 49 |A
|
| \62 | B | 50 |B
|
| \63 | C | 51 |C
|
| \64 | D | 52 |D
|
| \65 | E | 53 |E
|
| \66 | F | 54 |F
|
| \67 | G | 55 |G
|
| \70 | H | 56 |H
|
| \71 | I | 57 |I
|
| \72 | J | 58 |J
|
| \73 | K | 59 |K
|
| \74 | L | 60 |L
|
| \75 | M | 61 |M
|
| \76 | N | 62 |N
|
| \77 | O | 63 |O
|
| \100 | P | 64 |P
|
| \101 | Q | 65 |Q
|
| \102 | R | 66 |R
|
| \103 | S | 67 |S
|
| \104 | T | 68 |T
|
| \105 | U | 69 |U
|
| \106 | V | 70 |V
|
| \107 | W | 71 |W
|
| \110 | X | 72 |X
|
| \111 | Y | 73 |Y
|
| \112 | Z | 74 |Z
|
| \113 | [ | 75 |[
|
| \114 | \ | 76 |\
|
| \115 | ] | 77 |]
|
| \116 | ^ | 78 |^
|
| \117 | _ | 79 |_
|
| \120 | | 80 |
`` |
| \121 | a | 81 |a
|
| \122 | b | 82 |b
|
| \123 | c | 83 |c
|
| \124 | d | 84 |d
|
| \125 | e | 85 |e
|
| \126 | f | 86 |f
各位小伙伴们,我刚刚为大家分享了有关“Javascript 八进制转义字符(8进制)-javascript技巧”的知识,希望对你们有所帮助。如果您还有其他相关问题需要解决,欢迎随时提出哦!