javascript Escape Character

\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Tab
\' Single quote or apostrophe (')
\" Double quote (")
\\ Backslash (\)
\XXX XXX is an octal number (between 0 and 377) that represent the Latin-1 character equivalent. For example \251 is the octal code for the copyright symbol.
\xXX XX is a hexadecimal number (between 00 and FF) that represent the Latin-1 character equivalent. For example \xA9 is the hexadecimal code for the copyright symbol.
\uXXXX XXXX is a hexadecimal number (between 00 and FF) that represent the Unicode character equivalent. For example \u00A9 is the hexadecimal code for the copyright symbol.
(Note: Unicode is only supported by JavaScript 1.3)

The string "\tTom said \"Hello to everyone!\"\nSo did Mary." would print:

          Tom said "Hello to everyone!"
    So did Mary.

posted on 2007-06-13 15:29 jing 阅读(205) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
<2021年3月>
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

导航

统计

常用链接

留言簿(1)

随笔档案

web technology

搜索

最新评论

阅读排行榜

评论排行榜