








































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































































What can’t JavaScript programs do? From http://www.javascripter.net/faq/javascr2.htm
exception is the access to the browser's cookie files.
Object orientation in JavaScript
language
rather than classification (classes)
its own variables (properties), and has its own functions (methods)
7.2 Simple Program: Printing a Line of
Text in a Web Page
1 2 4 5 6 7 8 9 10 Printing a Line with Multiple Statements 11 12 19 20 21
1 2 4 5 6 7 8 9 Printing Multiple Lines 10 11 17 18 19
Illegal characters in
XHTML vs. JavaScript
use an XHTML JavaScript converter
7.2 Common escape sequences
Escape sequence Description \n (^) Newline. Position the screen cursor at the beginning of the next line. \t (^) Horizontal tab. Move the screen cursor to the next tab stop. \r (^) Carriage return. Position the screen cursor to the beginning of the current line; do not advance to the next line. Any characters output after the carriage return overwrite the characters previously output on that line. \ (^) Backslash. Used to represent a backslash character in a string. " (^) Double quote. Used to represent a double quote character in a string contained in double quotes. For example, window.alert( ""in quotes"" ); displays "in quotes" in an alert dialog.
' (^) Single quote. Used to represent a single quote character in a string. For example, window.alert( ''in quotes'' ); displays 'in quotes' in an alert dialog.
Fig. 7.5 Some common escape sequences.
For full list, see http://www.devguru.com/Technologies/ecmascript/quickref/escaped_characters.html