spacer
Yehuda Shiran October 5, 1999
Escape Sequences
Tips: October 1999

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
Strings often include escape sequences, sometimes called escape characters, special characters, or control characters. Escape sequences are usually used to express nonprintable characters, but other special purposes also exist. The following table outlines the escape sequences:

Escape SequenceMeaning
\dddoctal byte (3 digits: ddd)
\xddhexadecimal byte (2 digits: dd)
\\backslash
\'single quote
\"double quote
\bbackspace
\fform feed
\nnew line
\rcarriage return
\thorizontal tab

Be sure to use these inline characters only when needed. The behavior of some of them is not so intuitive. The carriage return escape sequence, for example, creates a new line only in dialog boxes and text areas.

Here are some strings that use these escape sequences:

"\x2499.99" // $99.99 (the hex value of the $ character is 24)
'c:\\games\\sc2000\\' // c:\games\sc2000\
'Let\'s learn JavaScript...' // Let's learn JavaScript...

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering MySQL Databases on the Web Using PHP · Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
So what is an Oracle Nested Table? · E-Discovery Architectures 101 · eBay Embraces Big Sellers, Cyber Monday Trends