├── .gitignore
├── Ch21
├── example.txt
├── timeout.php
├── 026694 Ch21code.zip
├── postexample.php
├── example.php
├── altevents.php
├── xdr.php
├── addcontact.php
├── ImagePingExample01.htm
├── addressbook.php
├── JSONPExample01.htm
└── XDomainRequestExample01.htm
├── Ch12
├── stylesheet2.css
├── stylesheet1.css
├── DocumentTypeExample.htm
├── CreateHTMLDocumentExample.htm
├── IFrameElementExample3.htm
├── IFrameElementExample.htm
├── IFrameElementExample2.htm
├── UserDataExample.htm
├── CreateDocumentExample.htm
├── IERangeExample.htm
└── IERangeExample3.htm
├── Ch24
└── SampleAntDir
│ ├── dev
│ └── src
│ │ └── js
│ │ ├── a.js
│ │ ├── b.js
│ │ ├── c.js
│ │ ├── aa.js
│ │ └── ab.js
│ ├── js
│ ├── output-min.js
│ └── output.js
│ └── readme.txt
├── Ch13
├── example.css
├── example.js
├── smile.gif
├── LoadEventExample02.htm
├── LoadEventExample03.htm
├── HTMLEventHandlerExample02.htm
├── HTMLEventHandlerExample04.htm
├── HTMLEventHandlerExample03.htm
├── LoadEventExample01.htm
├── ResizeEventExample01.htm
├── DOMEventObjectExample01.htm
├── DOMEventObjectExample04.htm
├── UnloadEventExample01.htm
├── KeyUpEventExample01.htm
├── KeyDownEventExample01.htm
├── IEEventObjectExample02.htm
├── KeyboardEventsExample01.htm
├── LoadEventExample04.htm
├── DOMEventObjectExample02.htm
├── KeyPressEventExample01.htm
├── LoadEventExample06.htm
├── DOMEventObjectExample05.htm
├── ButtonExample01.htm
├── DOMMouseScrollEventExample01.htm
├── IEEventHandlerExample01.htm
├── DOMLevel2EventHandlerExample01.htm
├── CrossBrowserEventObjectExample02.htm
├── BeforeUnloadEventExample01.htm
├── HTMLEventHandlerExample01.htm
├── ClientCoordinatesExample01.htm
├── ScreenCoordinatesExample01.htm
├── TextInputEventExample01.htm
├── IEEventObjectExample01.htm
├── MozOrientationEventExample01.htm
├── DOMContentLoadedEventExample01.htm
├── DOMSubtreeModifiedEventExample01.htm
├── DOMLevel0EventHandlerExample01.htm
├── DOMLevel3LocationGetModifierStateExample01.htm
├── DOMLevel3LocationPropertyExample01.htm
├── DOMLevel3KeyPropertyExample01.htm
├── HashChangeEventExample01.htm
├── LoadEventExample05.htm
├── IEEventObjectExample03.htm
├── DOMEventObjectExample06.htm
├── MouseWheelEventExample01.htm
├── CrossBrowserEventObjectExample03.htm
└── ScrollEventExample01.htm
├── Ch18
├── example.xml
├── employees.xml
├── employees4.xslt
├── employees.xslt
├── DOMLevel2CoreExample01.htm
├── XMLSerializerExample01.htm
├── employees2.xslt
└── DOMLevel3LoadSaveExample02.htm
├── Ch25
├── FileAPIExample06Upload.php
├── smile.gif
└── WebWorkerExample01.js
├── Ch17
├── nonscript.js
├── smile.gif
├── InvalidCharacterExample02.htm
├── InvalidCharacterExample01.htm
├── OnErrorExample01.htm
├── TryCatchExample01.htm
├── OperationAbortedExample03.htm
├── OperationAbortedExample01.htm
├── OperationAbortedExample02.htm
├── LongURLErrorExample01.htm
├── OnErrorExample02.htm
└── ThrowingErrorsExample02.htm
├── Ch15
├── smile.gif
├── smile2.gif
├── TypedViewByteLimitExample01.htm
└── DataViewExample02.htm
├── Ch16
├── smile.gif
└── billyBrowsers.ogg
├── README.md
├── Ch03
├── NumberExample03.htm
├── NumberExample05.htm
├── NumberExample07.htm
├── UnaryPlusMinusExample01.htm
├── UnaryPlusMinusExample02.htm
├── EqualityOperatorsExample02.htm
├── EqualityOperatorsExample03.htm
├── IncrementDecrementExample04.htm
├── NullExample02.htm
├── NumberExample01.htm
├── BitwiseOrExample01.htm
├── BitwiseXorExample01.htm
├── NullExample01.htm
├── BitwiseAndExample01.htm
├── NumberExample02.htm
├── UndefinedExample01.htm
├── UndefinedExample02.htm
├── WhileStatementExample01.htm
├── ForInStatementExample01.htm
├── ForStatementExample02.htm
├── FunctionExample02.htm
├── DoWhileStatementExample01.htm
├── ForStatementExample03.htm
├── LogicalOrExample01.htm
├── ForStatementExample04.htm
├── FunctionExample05.htm
├── LogicalAndExample02.htm
├── TypeofExample01.htm
├── BooleanExample02.htm
├── FunctionExample01.htm
├── ConditionalOperatorExample01.htm
├── BooleanExample01.htm
├── NumberExample06.htm
├── LogicalOrExample02.htm
├── LogicalAndExample01.htm
├── FunctionExample04.htm
├── IncrementDecrementExample01.htm
├── AddExample01.htm
├── LeftShiftExample01.htm
├── AddExample02.htm
├── LogicalNotExample02.htm
├── BitwiseNotExample01.htm
├── AddExample03.htm
├── SignedRightShiftExample01.htm
├── FunctionExample06.htm
├── SignedRightShiftExample02.htm
├── UnsignedRightShiftExample01.htm
├── IncrementDecrementExample02.htm
├── IncrementDecrementExample03.htm
├── LogicalNotExample01.htm
├── BreakStatementExample01.htm
├── UnsignedRightShiftExample02.htm
├── ContinueStatementExample01.htm
├── FunctionExample03.htm
├── IfStatementExample01.htm
├── FunctionExample09.htm
├── FunctionExample10.htm
├── StringExample02.htm
├── ModulusExample01.htm
├── MultiplyExample01.htm
├── IfStatementExample02.htm
├── UndefinedExample03.htm
├── WithStatementExample01.htm
├── DivideExample01.htm
├── NumberExample04.htm
├── UndefinedExample04.htm
├── FunctionExample07.htm
├── FunctionExample08.htm
├── StringExample03.htm
├── ForStatementExample01.htm
├── StringExample01.htm
├── SwitchStatementExample03.htm
├── AssignmentOperatorsExample01.htm
├── BreakStatementExample02.htm
├── ContinueStatementExample02.htm
├── SwitchStatementExample02.htm
├── SwitchStatementExample01.htm
├── SwitchStatementExample04.htm
└── NumberExample08.htm
├── Ch08
├── TimeoutExample02.htm
├── SystemDialogExample01.htm
├── WindowPositionExample02.htm
├── WindowSizeExample02.htm
├── anotherframeset.htm
├── SystemDialogExample03.htm
├── SystemDialogExample02.htm
├── LocationReplaceExample01.htm
├── TimeoutExample01.htm
├── IntervalExample01.htm
├── WindowOpenExample01.htm
├── frameset1.htm
├── FramesetExample01.htm
├── WindowPositionExample01.htm
├── frame.htm
├── anotherframe.htm
├── yetanotherframe.htm
├── red.htm
├── blue.htm
├── WindowOpenExample02.htm
├── DeleteOperatorExample01.htm
├── TimeoutExample03.htm
├── IntervalExample02.htm
├── PluginDetectionExample02.htm
└── PopupBlockerExample01.htm
├── Ch06
├── PrototypePatternExample02.htm
├── PrototypePatternExample03.htm
├── PrototypePatternExample04.htm
├── PrototypePatternExample09.htm
├── PrototypeChainingExample03.htm
├── CreatingObjectsExample01.htm
├── PrototypePatternExample06.htm
├── PrototypePatternExample11.htm
├── DataPropertiesExample02.htm
├── DataPropertiesExample01.htm
├── DataPropertiesExample03.htm
├── HybridFactoryPatternExample01.htm
└── PrototypePatternExample10.htm
├── Ch14
└── blank.htm
├── Ch05
├── ArrayTypeExample13.htm
├── ArrayTypeExample14.htm
├── StringTypeFromCharCodeExample01.htm
├── MathObjectRandomExample01.htm
├── MathObjectRandomExample02.htm
├── FunctionDeclarationExample01.htm
├── DateTypeExample01.htm
├── FunctionInitializationExample01.htm
├── ObjectTypeExample01.htm
├── ObjectTypeExample02.htm
├── ArrayTypeExample03.htm
├── ObjectTypeExample03.htm
├── ArrayTypeJoinExample01.htm
├── ArrayTypeExample04.htm
├── RegExpToStringExample01.htm
├── RegExpTestExample01.htm
├── DetectingArraysExample01.htm
├── MathObjectMinMaxExample01.htm
├── GlobalObjectWindowExample01.htm
├── ArrayMapExample01.htm
├── DateNowExample01.htm
├── ArrayReductionExample01.htm
├── ArrayTypeExample06.htm
├── ArrayFilterExample01.htm
├── ArrayTypeExample01.htm
├── FunctionTypeArgumentsCallerExample01.htm
├── DateTypeValueOfExample01.htm
├── FunctionTypeArgumentsCallerExample02.htm
├── ArrayTypeConcatExample01.htm
├── ArrayTypeExample07.htm
├── ArrayTypeSliceExample01.htm
├── RegExpConstructorPropertiesExample03.htm
├── FunctionTypeCallMethodExample01.htm
├── DateTypeUTCExample01.htm
├── ArrayTypeExample10.htm
├── StringTypeLocationMethodsExample01.htm
├── DateTypeConstructorExample01.htm
├── FunctionTypeThisExample01.htm
├── FunctionTypeExample01.htm
├── StringTypeCaseMethodExample01.htm
├── GlobalObjectURIDecodingExample01.htm
├── StringTypeExample01.htm
├── GlobalObjectURIEncodingExample01.htm
├── ArrayTypeExample05.htm
├── FunctionTypeCallExample01.htm
├── FunctionTypeBindMethodExample01.htm
├── ArrayTypeExample15.htm
├── ArrayTypeExample16.htm
├── StringTypeLocationMethodsExample02.htm
├── ArrayEveryAndSomeExample01.htm
├── RegExpExecExample01.htm
├── FunctionTypeLengthPropertyExample01.htm
├── ArrayTypeExample09.htm
├── MathObjectRoundingExample01.htm
├── ArrayTypeExample11.htm
├── FunctionTypeApplyMethodExample01.htm
├── ArrayTypeExample12.htm
├── BooleanTypeExample01.htm
├── FunctionTypeArgumentsExample01.htm
└── ArrayIndexOfExample01.htm
├── Ch04
├── DynamicPropertiesExample02.htm
├── DynamicPropertiesExample01.htm
├── ExecutionContextExample06.htm
├── FunctionArgumentsExample02.htm
├── ExecutionContextExample07.htm
├── ExecutionContextExample05.htm
├── FunctionArgumentsExample01.htm
├── ExecutionContextExample04.htm
├── ExecutionContextExample03.htm
├── ExecutionContextExample01.htm
└── DeterminingTypeExample01.htm
├── Ch23
└── OnLineExample01.htm
├── Ch10
├── DocumentWriteExample01.htm
├── DocumentWriteExample03.htm
├── DocumentWriteExample04.htm
├── GetElementByIdExample01.htm
├── GetElementByIdExample02.htm
├── TextNodeExample01.htm
├── TextNodeExample02.htm
├── DocumentWriteExample02.htm
├── ElementChildrenExample02.htm
├── CommentNodeExample01.htm
├── GetElementByIdExample03.htm
├── GetElementByIdExample04.htm
├── ElementChildrenExample01.htm
├── DynamicScriptExample01.htm
├── DynamicStyleExample01.htm
└── CreateElementExample01.htm
├── readme.txt
├── Ch19
├── XMLListTypeExample01.htm
├── XMLConstructionExample01.htm
├── XMLTypeExample01.htm
├── NamespaceTypeExample02.htm
├── QNameTypeExample02.htm
├── NamespaceTypeExample01.htm
├── NamespaceExample01.htm
├── QNameTypeExample01.htm
└── XMLConstructionExample02.htm
├── Ch07
├── FunctionDeclarationHoisting01.htm
├── FunctionNameExample01.htm
├── BlockScopeExample01.htm
├── FunctionDeclarationsErrorExample01.htm
├── BlockScopeExample02.htm
├── ThisObjectExample01.htm
├── BlockScopeExample03.htm
├── RecursionExample01.htm
├── RecursionExample02.htm
└── ThisObjectExample02.htm
├── Ch11
├── ContainsExample01.htm
├── CompareDocumentPositionExample01.htm
├── ElementChildrenExample01.htm
├── InnerHtmlExample03.htm
├── InnerHtmlExample01.htm
├── OuterTextExample01.htm
├── InnerHtmlExample02.htm
├── InnerTextExample01.htm
├── InnerTextExample04.htm
├── OuterHTMLExample01.htm
├── TextContentExample04.htm
├── TextContentExample01.htm
├── InnerTextExample02.htm
└── TextContentExample02.htm
├── Ch22
├── NonExtensibleObjectsExample01.htm
├── SealedObjectsExample01.htm
├── NonExtensibleObjectsExample02.htm
├── FrozenObjectsExample01.htm
├── DragAndDropExample01.htm
├── SealedObjectsExample02.htm
└── RepeatingTimersExample.htm
└── Ch20
├── JSONStringifyExample03.htm
├── JSONStringifyExample04.htm
└── JSONStringifyExample01.htm
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
--------------------------------------------------------------------------------
/Ch21/example.txt:
--------------------------------------------------------------------------------
1 | Hello world!
--------------------------------------------------------------------------------
/Ch12/stylesheet2.css:
--------------------------------------------------------------------------------
1 | a {
2 | color: navy;
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/a.js:
--------------------------------------------------------------------------------
1 | function A(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/b.js:
--------------------------------------------------------------------------------
1 | function B(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/c.js:
--------------------------------------------------------------------------------
1 | function C(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch13/example.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: red;
3 | }
--------------------------------------------------------------------------------
/Ch13/example.js:
--------------------------------------------------------------------------------
1 | function sayHi(){
2 | alert("hi!");
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/aa.js:
--------------------------------------------------------------------------------
1 | function AA(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/ab.js:
--------------------------------------------------------------------------------
1 | function AB(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch12/stylesheet1.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: silver;
3 | }
--------------------------------------------------------------------------------
/Ch18/example.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Ch25/FileAPIExample06Upload.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch17/nonscript.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Ch21/timeout.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/js/output-min.js:
--------------------------------------------------------------------------------
1 | function A(){}function B(){}function AA(){}function AB(){}function C(){};
--------------------------------------------------------------------------------
/Ch13/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch13/smile.gif
--------------------------------------------------------------------------------
/Ch15/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch15/smile.gif
--------------------------------------------------------------------------------
/Ch16/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch16/smile.gif
--------------------------------------------------------------------------------
/Ch17/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch17/smile.gif
--------------------------------------------------------------------------------
/Ch25/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch25/smile.gif
--------------------------------------------------------------------------------
/Ch15/smile2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch15/smile2.gif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | example code from the book Professional JavaScript for Web Developers, 3rd Edition.
3 |
4 | 《JavaScript高级程序设计》 随书源码
--------------------------------------------------------------------------------
/Ch03/NumberExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/NumberExample03.htm
--------------------------------------------------------------------------------
/Ch03/NumberExample05.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/NumberExample05.htm
--------------------------------------------------------------------------------
/Ch03/NumberExample07.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/NumberExample07.htm
--------------------------------------------------------------------------------
/Ch16/billyBrowsers.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch16/billyBrowsers.ogg
--------------------------------------------------------------------------------
/Ch21/026694 Ch21code.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch21/026694 Ch21code.zip
--------------------------------------------------------------------------------
/Ch08/TimeoutExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch08/TimeoutExample02.htm
--------------------------------------------------------------------------------
/Ch03/UnaryPlusMinusExample01.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/UnaryPlusMinusExample01.htm
--------------------------------------------------------------------------------
/Ch03/UnaryPlusMinusExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/UnaryPlusMinusExample02.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch06/PrototypePatternExample02.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch06/PrototypePatternExample03.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample04.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch06/PrototypePatternExample04.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample09.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch06/PrototypePatternExample09.htm
--------------------------------------------------------------------------------
/Ch17/InvalidCharacterExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch17/InvalidCharacterExample02.htm
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/js/output.js:
--------------------------------------------------------------------------------
1 | function A(){
2 |
3 | }function B(){
4 |
5 | }function AA(){
6 |
7 | }function AB(){
8 |
9 | }function C(){
10 |
11 | }
--------------------------------------------------------------------------------
/Ch03/EqualityOperatorsExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/EqualityOperatorsExample02.htm
--------------------------------------------------------------------------------
/Ch03/EqualityOperatorsExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/EqualityOperatorsExample03.htm
--------------------------------------------------------------------------------
/Ch03/IncrementDecrementExample04.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch03/IncrementDecrementExample04.htm
--------------------------------------------------------------------------------
/Ch06/PrototypeChainingExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/HEAD/Ch06/PrototypeChainingExample03.htm
--------------------------------------------------------------------------------
/Ch21/postexample.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch14/blank.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Blank Page for Rich Text Editing
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Ch25/WebWorkerExample01.js:
--------------------------------------------------------------------------------
1 | self.onmessage = function(event){
2 | var data = event.data;
3 | data.sort(function(a, b){
4 | return a - b;
5 | });
6 |
7 | self.postMessage(data);
8 | };
--------------------------------------------------------------------------------
/Ch21/example.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch21/altevents.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch08/SystemDialogExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System Dialogs Example
5 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch18/employees.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Nicholas C. Zakas
5 |
6 |
7 | Jim Smith
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 | Load event example.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch21/xdr.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch03/NullExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Null Example 2
5 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch21/addcontact.php:
--------------------------------------------------------------------------------
1 |
9 | Contact Saved:
--------------------------------------------------------------------------------
/Ch03/NumberExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 1
5 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch17/InvalidCharacterExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Invalid Character Example
5 |
6 |
7 |
8 | This file will cause an invalid character error in Internet Explorer.
9 |
10 |
--------------------------------------------------------------------------------
/Ch08/WindowPositionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Position Example 2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch03/BitwiseOrExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bitwise OR Example 1
5 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/BitwiseXorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bitwise XOR Example 1
5 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/NullExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Null Example 1
5 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch08/WindowSizeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Size Example 2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample13.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 13
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/BitwiseAndExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bitwise AND Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/NumberExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 2
5 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch04/DynamicPropertiesExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dynamic Properties Example 2
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample14.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 14
5 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch05/StringTypeFromCharCodeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type fromCharCode() Example
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch23/OnLineExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OnLine Example
5 |
6 |
7 | You are currently:
8 | To change your status, click File -> Work Offline and reload this page.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch08/anotherframeset.htm:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Frameset Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch05/MathObjectRandomExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Math Object Random Example 1
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch05/MathObjectRandomExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Math Object Random Example 2
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch10/DocumentWriteExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | document.write() Example
5 |
6 |
7 | The current date and time is:
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch04/DynamicPropertiesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dynamic Properties Example 1
5 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch03/WhileStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | While Statement Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/ForInStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For-In Statement Example 1
5 |
6 |
7 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 2
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/DoWhileStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Do While Statement Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 3
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/LogicalOrExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical OR Example 1
5 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch10/DocumentWriteExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | document.write() Example 3
5 |
6 |
7 | No extra characters here:
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 4
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 5
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch05/FunctionDeclarationExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Example
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch08/SystemDialogExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System Dialogs Example 3
5 |
6 |
7 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch12/DocumentTypeExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 DocumentType Example
5 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch03/LogicalAndExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical AND Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/TypeofExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | typeof Example
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/BooleanExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Boolean Example 2
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/DateTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 1
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/FunctionInitializationExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Example
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/ObjectTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Object Type Example 1
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ObjectTypeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Object Type Example 2
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch12/CreateHTMLDocumentExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 CreateHTMLDocument Example
5 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch17/OnErrorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OnError Example
5 |
6 |
7 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch21/ImagePingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Image Ping Example
5 |
6 |
7 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 3
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch05/ObjectTypeExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Object Type Example 3
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/ConditionalOperatorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Conditional Operator Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeJoinExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Join Example
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch21/addressbook.php:
--------------------------------------------------------------------------------
1 |
4 | [
5 | {
6 | "name": "Nicholas C. Zakas",
7 | "email": "nicholas@some-domain-name.com"
8 | },
9 | {
10 | "name": "Jim Smith",
11 | "email": "jimsmith@some-domain-name.com"
12 | }, {
13 | "name": "Michael Jones",
14 | "email": "mj@some-domain-name.com"
15 | }
16 | ]
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | This zip file contains the example code from the book Professional JavaScript for Web Developers, 3rd Edition. Please note that available here is the code from every chapter of the book with the exception of Chapters 1 and 2 and Appendixes A, B, C and D, all of which have no code samples for download.
2 |
3 | I hope you have fun with the sample code I have included and that you find it useful and informative. Enjoy.
4 |
--------------------------------------------------------------------------------
/Ch03/BooleanExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Boolean Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/NumberExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 6
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 4
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch17/TryCatchExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Try-Catch Example
5 |
6 |
7 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch19/XMLListTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | XMLList Type Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/LogicalOrExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical OR Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch10/DocumentWriteExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | document.write() Example 4
5 |
6 |
7 | This is some content that you won't get to see because it will be overwritten.
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch03/LogicalAndExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical AND Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/RegExpToStringExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp toString() Example
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch07/FunctionDeclarationHoisting01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Hoisting Example
5 |
6 |
7 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch18/employees4.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ,
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 4
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/RegExpTestExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp test() Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch08/SystemDialogExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System Dialogs Example 2
5 |
6 |
7 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/IncrementDecrementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Increment/Decrement Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/DetectingArraysExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Detecting Arrays Example
5 |
11 |
12 |
13 | This example is known to work in Internet Explorer 9, Firefox 4, Chrome 4, and Opera 10.5.
14 |
15 |
--------------------------------------------------------------------------------
/Ch05/MathObjectMinMaxExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Math Object Min/Max Example
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch08/LocationReplaceExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | You won't be able to get back here
5 |
6 |
7 | Enjoy this page for a second, because you won't be coming back here.
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 | Load event example.
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch17/OperationAbortedExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Operation Aborted Example
5 |
6 |
7 | The following code should not cause an Operation Aborted error in IE versions prior to 8.
8 |
9 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch08/TimeoutExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Timeout Example
5 |
6 |
7 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch12/IFrameElementExample3.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 IFrame Example
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/AddExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Add Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/LeftShiftExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Left Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 6
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch05/GlobalObjectWindowExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Global Object Window Example
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch17/OperationAbortedExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Operation Aborted Example
5 |
6 |
7 | The following code should cause an Operation Aborted error in IE versions prior to 8.
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch05/ArrayMapExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array map() Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/DateNowExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Now Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch12/IFrameElementExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 IFrame Example
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/AddExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Add Example 2
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/LogicalNotExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical Not Example 2
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/ArrayReductionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Reduction Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 6
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch12/IFrameElementExample2.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 IFrame Example
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch03/BitwiseNotExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bitwise NOT Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch04/FunctionArgumentsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Arguments Example 2
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayFilterExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array indexOf() Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch11/ContainsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Contains Example
5 |
6 |
7 |
8 |
9 |
10 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/AddExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Add Example 3
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/SignedRightShiftExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Signed Right Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch08/IntervalExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Interval Example
5 |
6 |
7 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch22/NonExtensibleObjectsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Non-Extensible Objects Example
5 |
6 |
7 | This only works in browsers that natively support ECMAScript 5.
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 6
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/SignedRightShiftExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Signed Right Shift Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/UnsignedRightShiftExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Unsigned Right Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/ResizeEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Resize Event Example
5 |
6 |
7 |
8 | Resize event example - resize the browser window.
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/IncrementDecrementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Increment/Decrement Example 2
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/IncrementDecrementExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Increment/Decrement Example 3
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch08/WindowOpenExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Open Example
5 |
6 |
7 | This will open a new window/tab:
8 |
9 | This will open in the current window/tab:
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch08/frameset1.htm:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Frameset Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch17/OperationAbortedExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Operation Aborted Example
5 |
6 |
7 | The following code should not cause an Operation Aborted error in IE versions prior to 8.
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch03/LogicalNotExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical Not Example 1
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample07.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 7
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeArgumentsCallerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Arguments Caller Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch08/FramesetExample01.htm:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Frameset Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch03/BreakStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Break Statement Example 1
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch03/UnsignedRightShiftExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Unsigned Right Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/DateTypeValueOfExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type ValueOf() Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch10/GetElementByIdExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | getElementById() Example
5 |
6 |
7 | This div should be retrieved by clicking the button.
8 |
9 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch19/XMLConstructionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | XML Construction Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 5
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch04/FunctionArgumentsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Arguments Example 1
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeArgumentsCallerExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Arguments Caller Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/ContinueStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continue Statement Example 1
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 3
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/IfStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | If Statement Example 1
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeConcatExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Concat Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample07.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 7
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample09.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 9
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch10/GetElementByIdExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | getElementById() Example 2
5 |
6 |
7 | This div should not be retrieved by clicking the button.
8 |
9 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch07/FunctionNameExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Name Example
5 |
6 |
7 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 | Click Me
8 | This link will not navigate when clicked.
9 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch13/UnloadEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Unload Event Example
5 |
6 |
7 |
8 | Unload event example - navigate to another page or close this tab/window to fire the event.
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch18/employees.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 | ,
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample10.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 10
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/StringExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Example 2
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch10/TextNodeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text Node Example
5 |
6 |
7 | Hello world!
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeSliceExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Slice Example
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/RegExpConstructorPropertiesExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp Constructor Properties Example 2
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/ModulusExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Modulus Example 1
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeCallMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type call() Method Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch06/CreatingObjectsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Creating Objects Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch10/TextNodeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text Node Example 2
5 |
6 |
7 | Hello world!
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch19/XMLTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | XML Type Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/MultiplyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Multiply Example 1
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/DateTypeUTCExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type Example
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch11/CompareDocumentPositionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CompareDocumentPosition Example
5 |
6 |
7 |
8 |
9 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/IfStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | If Statement Example 2
5 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 3
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 4
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prototype Pattern Example
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch07/BlockScopeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Block Scope Example
5 |
6 |
7 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch22/SealedObjectsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sealed Objects Example
5 |
6 |
7 | This only works in browsers that natively support ECMAScript 5.
8 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/WithStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | With Statement Example 1
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample10.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 10
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/DivideExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Divide Example 1
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/NumberExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 4
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 4
5 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch10/DocumentWriteExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | document.write() Example 2
5 |
6 |
7 | Because the string "" is included with document.write(),
8 | the script tag is closed before reaching its natural end. That means you'll see some extra
9 | text here:
10 | ");
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch05/StringTypeLocationMethodsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Location Methods Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch07/FunctionDeclarationsErrorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Error Example
5 |
6 |
7 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch13/KeyUpEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keyup Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample07.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 7
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample08.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 8
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/DateTypeConstructorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type Constructor Example
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeThisExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type this Example
5 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch08/WindowPositionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Position Example
5 |
6 |
7 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch10/ElementChildrenExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create Element Example
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch13/KeyDownEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keydown Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/StringTypeCaseMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Case Methods Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch10/CommentNodeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Comment Node Example
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/IEEventObjectExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Event Object Example
5 |
6 |
7 | Click Me
8 | This link will not navigate when clicked.
9 | This example only works in Internet Explorer.
10 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/KeyboardEventsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keyboard Events Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/GlobalObjectURIDecodingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Global Object URI Decoding Example
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch08/frame.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | topFrame
5 |
6 |
7 | topFrame
8 |
9 |
10 | window.name =
11 |
12 |
13 | top.name =
14 |
15 |
16 | parent.name =
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/StringExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Example 3
5 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch05/StringTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Example
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch19/NamespaceTypeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Namespace Type Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch19/QNameTypeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | QName Type Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 1
5 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch03/StringExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Example 1
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 3
5 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch05/GlobalObjectURIEncodingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Global Object URI Encoding Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch08/anotherframe.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | leftFrame
5 |
6 |
7 | leftFrame
8 |
9 |
10 | window.name =
11 |
12 |
13 | top.name =
14 |
15 |
16 | parent.name =
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/KeyPressEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keypress Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch18/DOMLevel2CoreExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 Core Example
5 |
6 |
7 | This example will not work in Internet Explorer.
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch22/NonExtensibleObjectsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Non-Extensible Objects Example
5 |
6 |
7 | This only works in browsers that natively support ECMAScript 5.
8 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch08/yetanotherframe.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | rightFrame
5 |
6 |
7 | rightFrame
8 |
9 |
10 | window.name =
11 |
12 |
13 | top.name =
14 |
15 |
16 | parent.name =
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch19/NamespaceTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Namespace Type Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch07/BlockScopeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Block Scope Example
5 |
6 |
7 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 3
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch21/JSONPExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JSONP Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 5
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch10/GetElementByIdExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | getElementById() Example 3
5 |
6 |
7 | This div should be retrieved by clicking the button.
8 | This div should not be retrieved by clicking the button.
9 |
10 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch13/ButtonExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Button Example
5 |
6 |
7 |
8 | Click me
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch15/TypedViewByteLimitExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Typed Arrays Example
5 |
6 |
7 | This only works in browsers that support typed arrays.
8 |
9 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 1
5 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeCallExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type call() Example
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch08/red.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | redFrame
5 |
6 |
7 | redFrame
8 |
9 |
10 | window.name =
11 |
12 |
13 | top.name =
14 |
15 |
16 | parent.name =
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/AssignmentOperatorsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Assignment Operators Example 1
5 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch03/BreakStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Break Statement Example 2
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch07/ThisObjectExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This Object Example
5 |
6 |
7 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch08/blue.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | blueFrame
5 |
6 |
7 | blueFrame
8 |
9 |
10 | window.name =
11 |
12 |
13 | top.name =
14 |
15 |
16 | parent.name =
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch10/GetElementByIdExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | getElementById() Example 4
5 |
6 |
7 |
8 | This div should be retrieved by clicking the button.
9 |
10 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch11/ElementChildrenExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create Element Example
5 |
6 |
7 |
8 | Item 1
9 | Item 2
10 | Item 3
11 |
12 |
13 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch18/XMLSerializerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | XMLSerializer Example
5 |
6 |
7 | This example will not work in Internet Explorer.
8 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch18/employees2.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 | Message:
13 |
14 |
15 |
16 | ,
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch10/ElementChildrenExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create Element Example
5 |
6 |
7 |
8 | Item 1
9 | Item 2
10 | Item 3
11 |
12 |
13 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch11/InnerHtmlExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerHtml Example
5 |
6 |
7 |
8 | This works in IE only.
9 |
10 |
11 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch12/UserDataExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | User Data Example
5 |
6 |
7 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch13/DOMMouseScrollEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOMMouseScroll Event Example
5 |
6 |
7 |
8 |
9 | Try scrolling your mouse wheel (Firefox only).
10 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/ContinueStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continue Statement Example 2
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch13/IEEventHandlerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Internet Explorer Event Handler Example
5 |
6 |
7 |
8 | This example works only in Internet Explorer.
9 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch17/LongURLErrorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Long URL Error Example (IE-only)
5 |
6 |
7 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 2
5 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeBindMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type bind() Method Example
5 |
18 |
19 |
20 | This example is known to work in Internet Explorer 9, Firefox 4, and Chrome 6.
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 1
5 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample15.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 15
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample16.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 16
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch12/CreateDocumentExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 CreateDocument Example
5 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch22/FrozenObjectsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Frozen Objects Example
5 |
6 |
7 | This only works in browsers that natively support ECMAScript 5.
8 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch07/BlockScopeExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Block Scope Example
5 |
6 |
7 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel2EventHandlerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 Event Handler Example
5 |
6 |
7 |
8 | This example won't work in Internet Explorer.
9 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch19/NamespaceExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Namespace Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch13/CrossBrowserEventObjectExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Cross-Browser Event Object Example
5 |
6 |
7 |
8 | Click Me
9 | This link will not navigate when clicked.
10 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch04/DeterminingTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Determining Type Example 1
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch05/StringTypeLocationMethodsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Location Methods Example 2
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch07/RecursionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Recursion Example
5 |
6 |
7 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch13/BeforeUnloadEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | BeforeUnload Event Example
5 |
6 |
7 |
8 | Try to navigate away from this page.
9 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch19/QNameTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | QName Type Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample11.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prototype Pattern Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch07/RecursionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Recursion Example
5 |
6 |
7 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch13/ClientCoordinatesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Client coordinates Example
5 |
6 |
7 |
8 | Click me
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/ScreenCoordinatesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Screen Coordinates Example
5 |
6 |
7 |
8 | Click me
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ArrayEveryAndSomeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array every() and some() Example
5 |
6 |
7 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch06/DataPropertiesExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Properties Example
5 |
18 |
19 |
20 | Note: this example only works in browsers that have implemented the ECMAScript 5 Object.defineProperty() method (IE9 and Firefox 4).
21 |
22 |
--------------------------------------------------------------------------------
/Ch08/WindowOpenExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Open Example 2
5 |
6 |
7 |
17 | This will open a new window/tab:
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch13/TextInputEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TextInput Event Example
5 |
6 |
7 |
8 |
9 | This example only works in browsers that support the textInput event.
10 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch22/DragAndDropExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Drag and Drop Example
5 |
6 |
7 |
8 |
9 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/RegExpExecExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp exec() Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch06/DataPropertiesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Properties Example
5 |
19 |
20 |
21 | Note: this example only works in browsers that have implemented the ECMAScript 5 Object.defineProperty() method (IE9 and Firefox 4).
22 |
23 |
--------------------------------------------------------------------------------
/Ch22/SealedObjectsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sealed Objects Example
5 |
6 |
7 | This only works in browsers that natively support ECMAScript 5.
8 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch08/DeleteOperatorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Delete Operator Example
5 |
6 |
7 | Hello world!
8 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch10/DynamicScriptExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dynamic Script Example
5 |
6 |
7 | You should see an alert saying "hi" after clicking the button.
8 |
9 |
10 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeLengthPropertyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Length Property Example
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch13/IEEventObjectExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Event Object Example
5 |
6 |
7 |
8 | This example only works in Internet Explorer.
9 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch13/MozOrientationEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MozOrientation Event Example
5 |
6 |
7 |
8 | This example only works in Firefox 3.6+ in devices such as Macbooks, Thinkpads, Windows Mobile, or Android.
9 |
10 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample09.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 9
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/DOMContentLoadedEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOMContentLoaded Event Example
5 |
6 |
7 |
8 |
9 | DOMContentLoaded example - works only in Opera and Firefox
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch13/DOMSubtreeModifiedEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DOMSubtreeModified Event Example
6 |
7 |
8 |
9 | Scroll event example - scroll the browser window.
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/MathObjectRoundingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Math Object Rounding Example
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch08/TimeoutExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Timeout Example 3
5 |
6 |
7 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel0EventHandlerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 0 Event Handler Example
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel3LocationGetModifierStateExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 3 getModifierState() Example
5 |
6 |
7 |
8 |
9 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample11.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 11
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeApplyMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type apply() Method Example
5 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample12.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 12
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch11/InnerHtmlExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerHtml Example
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel3LocationPropertyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 3 Location Property Example
5 |
6 |
7 |
8 |
9 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch19/XMLConstructionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | XML Construction Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch08/IntervalExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Interval Example 2
5 |
6 |
7 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel3KeyPropertyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 3 Key Property Example
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 4
5 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch13/HashChangeEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hash Change Example
5 |
6 |
7 |
8 | Click each of these links to change the URL hash.
9 |
13 | This example only works in browsers that onhashchange.
14 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch20/JSONStringifyExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JSON Stringify Example
5 |
6 |
7 | This example serializes an object and passes in a filter function.
8 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch22/RepeatingTimersExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Repeating Timers Example
5 |
6 |
7 |
8 |
9 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch05/BooleanTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Boolean Type Example
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch13/IEEventObjectExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Event Object Example
5 |
6 |
7 |
8 |
9 | This example works only in Internet Explorer.
10 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch20/JSONStringifyExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JSON Stringify Example
5 |
6 |
7 | This example serializes an object and passes in a filter function.
8 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeArgumentsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Arguments Example
5 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Ch08/PluginDetectionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Plugin Detection Example
5 |
6 |
7 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch20/JSONStringifyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JSON Stringify Example
5 |
6 |
7 | This example serializes an object and passes in a filter array.
8 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch11/OuterTextExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OuterText Example
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch13/MouseWheelEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MouseWheel Event Example
5 |
6 |
7 |
8 |
9 | Try scrolling your mouse wheel (IE, Safari, and Opera).
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch17/OnErrorExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OnError Example
5 |
6 |
7 |
8 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch21/XDomainRequestExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | XDomainRequest Example
5 |
6 |
7 | This example must be run on a server to work properly and will only work in IE8 and higher.
8 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/readme.txt:
--------------------------------------------------------------------------------
1 | In a command window, navigate to this directory, then run:
2 |
3 | ant js.concatenate
4 |
5 | To create the output.js file in the /js directory.
6 |
7 | Before running, you will need to download the JDK and Ant. The JDK can be downloaded from http://java.sun.com/javase/downloads/index.jsp. Ant can be downloaded from http://ant.apache.org. Follow the setup instructions for each.
8 |
9 | To run the js.verify target, you'll need to download Rhino (http://www.mozilla.org/rhino/) and JSLint (http://www.jslint.com/rhino/).
10 |
11 | To run the js.compress target, you'll need to download the YUI Compressor (http://developer.yahoo.com/yui/compressor/).
12 |
13 | You can run all tasks by running:
14 |
15 | ant all
--------------------------------------------------------------------------------
/Ch06/DataPropertiesExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Properties Example
5 |
20 |
21 |
22 | Note: this example only works in browsers that have implemented the ECMAScript 5 Object.defineProperty() method (IE9 and Firefox 4).
23 |
24 |
--------------------------------------------------------------------------------
/Ch06/HybridFactoryPatternExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hybrid Factory Pattern Example
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch13/CrossBrowserEventObjectExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Cross-Browser Event Object Example
5 |
6 |
7 |
8 |
9 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/ArrayIndexOfExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array indexOf() Example
5 |
6 |
7 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch11/InnerHtmlExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerHtml Example
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch11/InnerTextExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerText Example
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch11/InnerTextExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerText Example 4
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch11/OuterHTMLExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OuterHTML Example
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample10.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prototype Pattern Example
5 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Ch08/PopupBlockerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Popup Blocker Example
5 |
6 |
7 |
25 | This page tries to open a window as the page is loading. It should be blocked.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch10/DynamicStyleExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dynamic Style Example
5 |
6 |
7 | You should see the background color change after clicking the button.
8 |
9 |
10 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch11/TextContentExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerText Example 4
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch15/DataViewExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Typed Arrays Example
5 |
6 |
7 | This only works in browsers that support typed arrays.
8 |
9 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/NumberExample08.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 9
5 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch10/CreateElementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create Element Example
5 |
6 |
7 |
14 |
15 |
16 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch11/TextContentExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TextContent Example
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch12/IERangeExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Range Example
5 |
13 |
14 | Hello world!
15 |
16 | Note: This example uses Internet Explorer ranges and will only work on Internet Explorer.
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch07/ThisObjectExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This Object Example 2
5 |
6 |
7 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch11/InnerTextExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerText Example 2
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch12/IERangeExample3.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Range Example
5 |
13 |
14 | Hello world!
15 |
16 | Note: This example uses Internet Explorer ranges and will only work on Internet Explorer.
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch18/DOMLevel3LoadSaveExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 3 Load Save Example
5 |
6 |
7 | This example is known to work only in Opera.
8 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch13/ScrollEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Scroll Event Example
6 |
7 |
8 |
9 | Scroll event example - scroll the browser window.
10 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch17/ThrowingErrorsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Throwing Errors Example
5 |
6 |
7 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch11/TextContentExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TextContent Example 2
5 |
6 |
7 |
8 |
This is a paragraph with a list following it.
9 |
10 | Item 1
11 | Item 2
12 | Item 3
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------