├── .gitignore
├── Ch03
├── AddExample01.htm
├── AddExample02.htm
├── AddExample03.htm
├── AssignmentOperatorsExample01.htm
├── BitwiseAndExample01.htm
├── BitwiseNotExample01.htm
├── BitwiseOrExample01.htm
├── BitwiseXorExample01.htm
├── BooleanExample01.htm
├── BooleanExample02.htm
├── BreakStatementExample01.htm
├── BreakStatementExample02.htm
├── ConditionalOperatorExample01.htm
├── ContinueStatementExample01.htm
├── ContinueStatementExample02.htm
├── DivideExample01.htm
├── DoWhileStatementExample01.htm
├── EqualityOperatorsExample01.htm
├── EqualityOperatorsExample02.htm
├── EqualityOperatorsExample03.htm
├── ForInStatementExample01.htm
├── ForStatementExample01.htm
├── ForStatementExample02.htm
├── ForStatementExample03.htm
├── ForStatementExample04.htm
├── FunctionExample01.htm
├── FunctionExample02.htm
├── FunctionExample03.htm
├── FunctionExample04.htm
├── FunctionExample05.htm
├── FunctionExample06.htm
├── FunctionExample07.htm
├── FunctionExample08.htm
├── FunctionExample09.htm
├── FunctionExample10.htm
├── IfStatementExample01.htm
├── IfStatementExample02.htm
├── IncrementDecrementExample01.htm
├── IncrementDecrementExample02.htm
├── IncrementDecrementExample03.htm
├── IncrementDecrementExample04.htm
├── LeftShiftExample01.htm
├── LogicalAndExample01.htm
├── LogicalAndExample02.htm
├── LogicalNotExample01.htm
├── LogicalNotExample02.htm
├── LogicalOrExample01.htm
├── LogicalOrExample02.htm
├── ModulusExample01.htm
├── MultiplyExample01.htm
├── NullExample01.htm
├── NullExample02.htm
├── NumberExample01.htm
├── NumberExample02.htm
├── NumberExample03.htm
├── NumberExample04.htm
├── NumberExample05.htm
├── NumberExample06.htm
├── NumberExample07.htm
├── NumberExample08.htm
├── RelationalOperatorsExample01.htm
├── SignedRightShiftExample01.htm
├── SignedRightShiftExample02.htm
├── StringExample01.htm
├── StringExample02.htm
├── StringExample03.htm
├── SubtractExample01.htm
├── SwitchStatementExample01.htm
├── SwitchStatementExample02.htm
├── SwitchStatementExample03.htm
├── SwitchStatementExample04.htm
├── TypeofExample01.htm
├── UnaryPlusMinusExample01.htm
├── UnaryPlusMinusExample02.htm
├── UndefinedExample01.htm
├── UndefinedExample02.htm
├── UndefinedExample03.htm
├── UndefinedExample04.htm
├── UnsignedRightShiftExample01.htm
├── UnsignedRightShiftExample02.htm
├── WhileStatementExample01.htm
└── WithStatementExample01.htm
├── Ch04
├── DeterminingTypeExample01.htm
├── DynamicPropertiesExample01.htm
├── DynamicPropertiesExample02.htm
├── ExecutionContextExample01.htm
├── ExecutionContextExample02.htm
├── ExecutionContextExample03.htm
├── ExecutionContextExample04.htm
├── ExecutionContextExample05.htm
├── ExecutionContextExample06.htm
├── ExecutionContextExample07.htm
├── FunctionArgumentsExample01.htm
└── FunctionArgumentsExample02.htm
├── Ch05
├── ArrayEveryAndSomeExample01.htm
├── ArrayFilterExample01.htm
├── ArrayIndexOfExample01.htm
├── ArrayMapExample01.htm
├── ArrayReductionExample01.htm
├── ArrayTypeConcatExample01.htm
├── ArrayTypeExample01.htm
├── ArrayTypeExample02.htm
├── ArrayTypeExample03.htm
├── ArrayTypeExample04.htm
├── ArrayTypeExample05.htm
├── ArrayTypeExample06.htm
├── ArrayTypeExample07.htm
├── ArrayTypeExample08.htm
├── ArrayTypeExample09.htm
├── ArrayTypeExample10.htm
├── ArrayTypeExample11.htm
├── ArrayTypeExample12.htm
├── ArrayTypeExample13.htm
├── ArrayTypeExample14.htm
├── ArrayTypeExample15.htm
├── ArrayTypeExample16.htm
├── ArrayTypeJoinExample01.htm
├── ArrayTypeSliceExample01.htm
├── ArrayTypeSpliceExample01.htm
├── BooleanTypeExample01.htm
├── DateNowExample01.htm
├── DateTypeConstructorExample01.htm
├── DateTypeExample01.htm
├── DateTypeUTCExample01.htm
├── DateTypeValueOfExample01.htm
├── DetectingArraysExample01.htm
├── FunctionAsAnArgumentExample01.htm
├── FunctionDeclarationExample01.htm
├── FunctionInitializationExample01.htm
├── FunctionReturningFunctionExample01.htm
├── FunctionTypeApplyMethodExample01.htm
├── FunctionTypeArgumentsCallerExample01.htm
├── FunctionTypeArgumentsCallerExample02.htm
├── FunctionTypeArgumentsExample01.htm
├── FunctionTypeBindMethodExample01.htm
├── FunctionTypeCallExample01.htm
├── FunctionTypeCallMethodExample01.htm
├── FunctionTypeExample01.htm
├── FunctionTypeLengthPropertyExample01.htm
├── FunctionTypeThisExample01.htm
├── GlobalObjectURIDecodingExample01.htm
├── GlobalObjectURIEncodingExample01.htm
├── GlobalObjectWindowExample01.htm
├── MathObjectMinMaxExample01.htm
├── MathObjectRandomExample01.htm
├── MathObjectRandomExample02.htm
├── MathObjectRandomExample03.htm
├── MathObjectRoundingExample01.htm
├── NumberTypeExample01.htm
├── ObjectTypeExample01.htm
├── ObjectTypeExample02.htm
├── ObjectTypeExample03.htm
├── ObjectTypeExample04.htm
├── RegExpConstructorPropertiesExample01.htm
├── RegExpConstructorPropertiesExample02.htm
├── RegExpConstructorPropertiesExample03.htm
├── RegExpExecExample01.htm
├── RegExpExecExample02.htm
├── RegExpInstancePropertiesExample01.htm
├── RegExpTestExample01.htm
├── RegExpToStringExample01.htm
├── StringTypeCaseMethodExample01.htm
├── StringTypeExample01.htm
├── StringTypeFromCharCodeExample01.htm
├── StringTypeLocaleCompareExample01.htm
├── StringTypeLocationMethodsExample01.htm
├── StringTypeLocationMethodsExample02.htm
├── StringTypeManipulationMethodsExample01.htm
└── StringTypePatternMatchingExample01.htm
├── Ch06
├── AccessorPropertiesExample01.htm
├── AccessorPropertiesExample02.htm
├── CombinationInheritanceExample01.htm
├── ConstructorPatternExample01.htm
├── ConstructorPatternExample02.htm
├── ConstructorPatternExample03.htm
├── ConstructorStealingExample01.htm
├── ConstructorStealingExample02.htm
├── CreatingObjectsExample01.htm
├── DataPropertiesExample01.htm
├── DataPropertiesExample02.htm
├── DataPropertiesExample03.htm
├── DynamicPrototypeExample01.htm
├── FactoryPatternExample01.htm
├── GetPropertyDescriptorExample01.htm
├── HybridFactoryPatternExample01.htm
├── HybridFactoryPatternExample02.htm
├── HybridPatternExample01.htm
├── MultiplePropertiesExample01.htm
├── ObjectKeysExample01.htm
├── ObjectPropertyNamesExample01.htm
├── ParasiticCombinationInheritanceExample01.htm
├── PrototypalInheritanceExample01.htm
├── PrototypalInheritanceExample02.htm
├── PrototypalInheritanceExample03.htm
├── PrototypeChainingExample01.htm
├── PrototypeChainingExample02.htm
├── PrototypeChainingExample03.htm
├── PrototypeChainingExample04.htm
├── PrototypePatternExample01.htm
├── PrototypePatternExample02.htm
├── PrototypePatternExample03.htm
├── PrototypePatternExample04.htm
├── PrototypePatternExample05.htm
├── PrototypePatternExample06.htm
├── PrototypePatternExample07.htm
├── PrototypePatternExample08.htm
├── PrototypePatternExample09.htm
├── PrototypePatternExample10.htm
├── PrototypePatternExample11.htm
└── PrototypePatternExample12.htm
├── Ch07
├── BlockScopeExample01.htm
├── BlockScopeExample02.htm
├── BlockScopeExample03.htm
├── ClosureExample01.htm
├── ClosureExample02.htm
├── FunctionDeclarationHoisting01.htm
├── FunctionDeclarationsErrorExample01.htm
├── FunctionNameExample01.htm
├── ModuleAugmentationPatternExample01.htm
├── ModulePatternExample01.htm
├── PrivilegedMethodExample01.htm
├── PrivilegedMethodExample02.htm
├── RecursionExample01.htm
├── RecursionExample02.htm
├── ThisObjectExample01.htm
├── ThisObjectExample02.htm
└── ThisObjectExample03.htm
├── Ch08
├── DeleteOperatorExample01.htm
├── FramesetExample01.htm
├── IntervalExample01.htm
├── IntervalExample02.htm
├── LocationExample01.htm
├── LocationReplaceExample01.htm
├── PluginDetectionExample01.htm
├── PluginDetectionExample02.htm
├── PluginDetectionExample03.htm
├── PopupBlockerExample01.htm
├── SystemDialogExample01.htm
├── SystemDialogExample02.htm
├── SystemDialogExample03.htm
├── TimeoutExample01.htm
├── TimeoutExample02.htm
├── TimeoutExample03.htm
├── WindowOpenExample01.htm
├── WindowOpenExample02.htm
├── WindowPositionExample01.htm
├── WindowPositionExample02.htm
├── WindowSizeExample01.htm
├── WindowSizeExample02.htm
├── anotherframe.htm
├── anotherframeset.htm
├── blue.htm
├── frame.htm
├── frameset1.htm
├── red.htm
└── yetanotherframe.htm
├── Ch09
├── CapabilitiesDetectionExample01.htm
├── QuirksDetectionExample01.htm
├── UserAgentDetectionExample01.htm
└── client.js
├── Ch10
├── AttrExample01.htm
├── CDataSectionNodeExample01.htm
├── CommentNodeExample01.htm
├── CreateElementExample01.htm
├── DocumentFragmentExample01.htm
├── DocumentWriteExample01.htm
├── DocumentWriteExample02.htm
├── DocumentWriteExample03.htm
├── DocumentWriteExample04.htm
├── DynamicScriptExample01.htm
├── DynamicScriptExample02.htm
├── DynamicStyleExample01.htm
├── DynamicStyleExample2.htm
├── ElementAttributesExample01.htm
├── ElementAttributesExample02.htm
├── ElementAttributesExample03.htm
├── ElementAttributesExample04.htm
├── ElementChildrenExample01.htm
├── ElementChildrenExample02.htm
├── GetElementByIdExample01.htm
├── GetElementByIdExample02.htm
├── GetElementByIdExample03.htm
├── GetElementByIdExample04.htm
├── GetElementsByNameExample01.htm
├── GetElementsByTagNameExample01.htm
├── HTMLElementsExample01.htm
├── TextNodeExample01.htm
├── TextNodeExample02.htm
├── TextNodeExample03.htm
├── TextNodeExample04.htm
├── TextNodeExample05.htm
├── TextNodeExample06.htm
└── client.js
├── Ch11
├── ClassListExample01.htm
├── CompareDocumentPositionExample01.htm
├── ContainsExample01.htm
├── ContainsExample02.htm
├── ElementChildrenExample01.htm
├── ElementTraversalExample01.htm
├── GetElementsByClassNameExample01.htm
├── InnerHtmlExample01.htm
├── InnerHtmlExample02.htm
├── InnerHtmlExample03.htm
├── InnerHtmlExample04.htm
├── InnerTextExample01.htm
├── InnerTextExample02.htm
├── InnerTextExample03.htm
├── InnerTextExample04.htm
├── InnerTextExample05.htm
├── InsertAdjacentHtmlExample01.htm
├── OuterHTMLExample01.htm
├── OuterTextExample01.htm
├── OuterTextExample02.htm
├── SelectorsAPIExample01.htm
├── SelectorsAPIExample02.htm
├── SelectorsAPIExample03.htm
├── TextContentExample01.htm
├── TextContentExample02.htm
├── TextContentExample03.htm
├── TextContentExample04.htm
└── client.js
├── Ch12
├── CSSRulesExample.htm
├── CSSRulesExample2.htm
├── ComputedStylesExample.htm
├── CreateDocumentExample.htm
├── CreateHTMLDocumentExample.htm
├── DOMRangeExample.htm
├── DOMRangeExample2.htm
├── DOMRangeExample3.htm
├── DOMRangeExample4.htm
├── DOMRangeExample5.htm
├── DOMRangeExample6.htm
├── DOMRangeExample7.htm
├── DOMRangeExample8.htm
├── DOMRangeExample9.htm
├── DOMStyleObjectExample.htm
├── DocumentTypeExample.htm
├── GetBoundingClientRectExample.htm
├── IEComputedStylesExample.htm
├── IERangeExample.htm
├── IERangeExample1.htm
├── IERangeExample2.htm
├── IERangeExample3.htm
├── IERangeExample4.htm
├── IERangeExample5.htm
├── IERangeExample6.htm
├── IFrameElementExample.htm
├── IFrameElementExample2.htm
├── IFrameElementExample3.htm
├── NamespaceExample.xml
├── NodeIteratorExample1.htm
├── NodeIteratorExample2.htm
├── OffsetDimensionsExample.htm
├── ScrollDimensionsExample.htm
├── StyleObjectExample.htm
├── StyleSheetsExample.htm
├── StyleSheetsExample2.htm
├── TreeWalkerExample1.htm
├── TreeWalkerExample2.htm
├── UserDataExample.htm
├── stylesheet1.css
└── stylesheet2.css
├── Ch13
├── BeforeUnloadEventExample01.htm
├── ButtonExample01.htm
├── ClientCoordinatesExample01.htm
├── CompositionEventsExample01.htm
├── ContextMenuEventExample01.htm
├── CrossBrowserEventHandlerExample01.htm
├── CrossBrowserEventObjectExample01.htm
├── CrossBrowserEventObjectExample02.htm
├── CrossBrowserEventObjectExample03.htm
├── CrossBrowserMouseWheelEventExample01.htm
├── DOMContentLoadedEventExample01.htm
├── DOMEventFlowExample01.htm
├── DOMEventObjectExample01.htm
├── DOMEventObjectExample02.htm
├── DOMEventObjectExample03.htm
├── DOMEventObjectExample04.htm
├── DOMEventObjectExample05.htm
├── DOMEventObjectExample06.htm
├── DOMLevel0EventHandlerExample01.htm
├── DOMLevel2EventHandlerExample01.htm
├── DOMLevel2EventHandlerExample02.htm
├── DOMLevel3KeyPropertyExample01.htm
├── DOMLevel3LocationGetModifierStateExample01.htm
├── DOMLevel3LocationPropertyExample01.htm
├── DOMMouseScrollEventExample01.htm
├── DOMSubtreeModifiedEventExample01.htm
├── DeviceMotionEventExample01.htm
├── DeviceOrientationEventExample01.htm
├── DoubleClickExample01.htm
├── EventBubblingExample01.htm
├── EventCapturingExample01.htm
├── EventDelegationExample01.htm
├── EventUtil.js
├── GestureEventsExample01.htm
├── HTMLEventHandlerExample01.htm
├── HTMLEventHandlerExample02.htm
├── HTMLEventHandlerExample03.htm
├── HTMLEventHandlerExample04.htm
├── HashChangeEventExample01.htm
├── IEEventHandlerExample01.htm
├── IEEventHandlerExample02.htm
├── IEEventObjectExample01.htm
├── IEEventObjectExample02.htm
├── IEEventObjectExample03.htm
├── KeyDownEventExample01.htm
├── KeyPressEventExample01.htm
├── KeyUpEventExample01.htm
├── KeyboardEventsExample01.htm
├── LoadEventExample01.htm
├── LoadEventExample02.htm
├── LoadEventExample03.htm
├── LoadEventExample04.htm
├── LoadEventExample05.htm
├── LoadEventExample06.htm
├── LoadEventExample07.htm
├── ModifierKeysExample01.htm
├── MouseWheelEventExample01.htm
├── MozAfterPaintExample01.htm
├── MozOrientationEventExample01.htm
├── NodeInsertionEventsExample01.htm
├── NodeRemovalEventsExample01.htm
├── OrientationChangeEventExample01.htm
├── PageCoordinatesExample01.htm
├── PageShowEventExample01.htm
├── ReadyStateChangeEventExample01.htm
├── ReadyStateChangeEventExample02.htm
├── RelatedElementsExample01.htm
├── ResizeEventExample01.htm
├── ScreenCoordinatesExample01.htm
├── ScrollEventExample01.htm
├── SimulateDOMClickExample01.htm
├── SimulateDOMCustomEventExample01.htm
├── SimulateDOMKeyEventExample01.htm
├── SimulateFFKeyEventExample01.htm
├── SimulateIEClickExample01.htm
├── SimulateIEKeyEventExample01.htm
├── TextChangeEventExample01.htm
├── TextInputEventExample01.htm
├── TouchEventsExample01.htm
├── UIEventsExample01.htm
├── UnloadEventExample01.htm
├── client.js
├── example.css
├── example.js
└── smile.gif
├── Ch14
├── ContentEditableExample01.htm
├── EventUtil.js
├── FocusExample01.htm
├── FormFieldEventsExample01.htm
├── FormFieldsExample01.htm
├── FormFieldsExample02.htm
├── FormResetExample01.htm
├── FormSerializationExample01.htm
├── FormSubmissionExample01.htm
├── InputFieldEmailValidationExample01.htm
├── InputFieldPatternValidationExample01.htm
├── RequiredFieldExample01.htm
├── RichTextEditingExample01.htm
├── SelectEventExample01.htm
├── SelectboxExample01.htm
├── SelectboxExample02.htm
├── SelectboxExample03.htm
├── SelectboxExample04.htm
├── SelectboxExample05.htm
├── SelectboxExample06.htm
├── TextboxClipboardExample01.htm
├── TextboxGetSelectedTextExample01.htm
├── TextboxInputFilteringExample01.htm
├── TextboxPartialSelectionExample01.htm
├── TextboxSelectExample01.htm
├── TextboxTabForwardExample01.htm
├── blank.htm
└── client.js
├── Ch15
├── 2DClearRectExample01.htm
├── 2DDataUrlExample01.htm
├── 2DDrawImageExample01.htm
├── 2DFillRectExample01.htm
├── 2DFillRectGradientExample01.htm
├── 2DFillRectGradientExample02.htm
├── 2DFillRectGradientExample03.htm
├── 2DFillRectGradientExample04.htm
├── 2DFillRectPatternExample01.htm
├── 2DFillRectShadowExample01.htm
├── 2DGlobalAlphaExample01.htm
├── 2DGlobalCompositeOperationExample01.htm
├── 2DImageDataExample01.htm
├── 2DPathExample01.htm
├── 2DSaveRestoreExample01.htm
├── 2DStrokeRectExample01.htm
├── 2DStrokeRectShadowExample01.htm
├── 2DTextExample01.htm
├── 2DTextExample02.htm
├── 2DTextExample03.htm
├── 2DTextExample04.htm
├── 2DTransformExample01.htm
├── DataViewExample01.htm
├── DataViewExample02.htm
├── TypedViewByteLimitExample01.htm
├── WebGLExample01.htm
├── WebGLExample02.htm
├── smile.gif
└── smile2.gif
├── Ch16
├── AudioPlayerExample01.htm
├── CrossDocumentMessagingExample01.htm
├── CrossDocumentMessagingExample01Inner.htm
├── CustomDraggableExample01.htm
├── DataTransferExample01.htm
├── DragAndDropExample01.htm
├── DragAndDropExample02.htm
├── DragAndDropExample03.htm
├── DragAndDropExample04.htm
├── DropEffectAndEffectAllowedExample01.htm
├── EventUtil.js
├── HistoryStateManagementExample01.htm
├── SetDragImageExample01.htm
├── VideoPlayerExample01.htm
├── billyBrowsers.ogg
└── smile.gif
├── Ch17
├── AssertExample01.htm
├── CommunicationErrorExample01.htm
├── ConsoleLoggingExample01.htm
├── EventUtil.js
├── InvalidCharacterExample01.htm
├── InvalidCharacterExample02.htm
├── LongURLErrorExample01.htm
├── OnErrorExample01.htm
├── OnErrorExample02.htm
├── OperationAbortedExample01.htm
├── OperationAbortedExample02.htm
├── OperationAbortedExample03.htm
├── PageLoggingExample01.htm
├── ThrowingErrorsExample01.htm
├── ThrowingErrorsExample02.htm
├── TryCatchExample01.htm
├── TryCatchExample02.htm
├── nonscript.js
└── smile.gif
├── Ch18
├── CrossBrowserXPathExample01.htm
├── CrossBrowserXPathExample02.htm
├── CrossBrowserXmlExample01.htm
├── CrossBrowserXmlExample02.htm
├── CrossBrowserXsltExample01.htm
├── DOMLevel2CoreExample01.htm
├── DOMLevel3LoadSaveExample01.htm
├── DOMLevel3LoadSaveExample02.htm
├── DOMLevel3LoadSaveExample03.htm
├── DOMLevel3LoadSaveExample04.htm
├── DOMLevel3LoadSaveExample05.htm
├── DOMLevel3LoadSaveExample06.htm
├── DOMLevel3LoadSaveExample07.htm
├── DOMLevel3LoadSaveExample08.htm
├── DOMParserExample01.htm
├── DOMParserExample02.htm
├── DomXPathExample01.htm
├── DomXPathExample02.htm
├── DomXPathExample03.htm
├── DomXPathExample04.htm
├── DomXPathExample05.htm
├── DomXPathExample06.htm
├── DomXPathExample07.htm
├── DomXPathExample08.htm
├── IEXPathExample01.htm
├── IEXPathExample02.htm
├── IEXPathExample03.htm
├── IEXmlDomExample.htm
├── IEXmlDomExample01.htm
├── IEXmlDomExample02.htm
├── IEXmlDomExample03.htm
├── IEXmlDomExample04.htm
├── IEXmlDomExample2.htm
├── IEXmlDomExample3.htm
├── IEXsltExample01.htm
├── IEXsltExample02.htm
├── IEXsltExample03.htm
├── IEXsltExample04.htm
├── IEXsltExample05.htm
├── XMLSerializerExample01.htm
├── XsltProcessorExample01.htm
├── XsltProcessorExample02.htm
├── XsltProcessorExample03.htm
├── XsltProcessorExample04.htm
├── employees.xml
├── employees.xslt
├── employees2.xslt
├── employees3.xslt
├── employees4.xslt
└── example.xml
├── Ch19
├── AttributesExample01.htm
├── ForEachInExample01.htm
├── NamespaceExample01.htm
├── NamespaceTypeExample01.htm
├── NamespaceTypeExample02.htm
├── NodeKindExample01.htm
├── ParsingAndSerializationExample01.htm
├── QNameTypeExample01.htm
├── QNameTypeExample02.htm
├── QueryingExample01.htm
├── UsageExample01.htm
├── UsageExample02.htm
├── XMLConstructionExample01.htm
├── XMLConstructionExample02.htm
├── XMLConstructionExample03.htm
├── XMLListTypeExample01.htm
├── XMLListTypeExample02.htm
└── XMLTypeExample01.htm
├── Ch20
├── JSONObjectExample01.htm
├── JSONParseExample01.htm
├── JSONParseExample02.htm
├── JSONStringifyExample01.htm
├── JSONStringifyExample02.htm
├── JSONStringifyExample03.htm
├── JSONStringifyExample04.htm
└── JSONStringifyExample05.htm
├── Ch21
├── 026694 Ch21code.zip
├── CrossBrowserCORSRequestExample01.htm
├── HTTPStreamingExample01.htm
├── ImagePingExample01.htm
├── JSONPExample01.htm
├── XDomainRequestExample01.htm
├── XHRAlternateEventsExample01.htm
├── XHRAsyncExample01.htm
├── XHRErrorEventExample01.htm
├── XHRExample01.htm
├── XHRFormDataExample01.htm
├── XHRLoadEventExample01.htm
├── XHRPostExample01.htm
├── XHRProgressEventExample01.htm
├── XHRRequestHeadersExample01.htm
├── XHRResponseHeadersExample01.htm
├── XHRTimeoutExample01.htm
├── addcontact.php
├── addressbook.php
├── altevents.php
├── example.php
├── example.txt
├── postexample.php
├── timeout.php
└── xdr.php
├── Ch22
├── ArrayChunkingExample.htm
├── DragAndDropExample01.htm
├── DragAndDropExample02.htm
├── DragAndDropExample03.htm
├── DragAndDropExample04.htm
├── EventTarget.js
├── EventTargetExample01.htm
├── EventTargetExample02.htm
├── EventUtil.js
├── FrozenObjectsExample01.htm
├── FrozenObjectsExample02.htm
├── FunctionBindingExample01.htm
├── FunctionBindingExample02.htm
├── FunctionCurryingExample01.htm
├── FunctionCurryingExample02.htm
├── FunctionCurryingExample03.htm
├── LazyLoadingExample01.htm
├── LazyLoadingExample02.htm
├── NonExtensibleObjectsExample01.htm
├── NonExtensibleObjectsExample02.htm
├── RepeatingTimersExample.htm
├── ScopeSafeConstructorsExample01.htm
├── ScopeSafeConstructorsExample02.htm
├── ScopeSafeConstructorsExample03.htm
├── ScopeSafeConstructorsExample04.htm
├── SealedObjectsExample01.htm
├── SealedObjectsExample02.htm
├── ThrottlingExample.htm
└── client.js
├── Ch23
├── CookieUtil.js
├── CookiesExample01.htm
├── EventUtil.js
├── GlobalAndLocalStorageExample01.htm
├── GlobalStorageExample01.htm
├── IndexedDBExample01.htm
├── IndexedDBExample02.htm
├── IndexedDBExample03.htm
├── IndexedDBExample04.htm
├── IndexedDBExample05.htm
├── LocalStorageExample01.htm
├── OnLineExample01.htm
├── OnlineEventsExample01.htm
├── SessionStorageExample01.htm
├── StorageEventExample01.htm
├── SubCookieUtil.js
├── SubCookiesExample01.htm
├── UserDataExample01.htm
└── client.js
├── Ch24
└── SampleAntDir
│ ├── build.xml
│ ├── dev
│ └── src
│ │ └── js
│ │ ├── a.js
│ │ ├── aa.js
│ │ ├── ab.js
│ │ ├── b.js
│ │ └── c.js
│ ├── js
│ ├── output-min.js
│ └── output.js
│ └── readme.txt
├── Ch25
├── EventUtil.js
├── FileAPIExample01.htm
├── FileAPIExample02.htm
├── FileAPIExample03.htm
├── FileAPIExample04.htm
├── FileAPIExample05.htm
├── FileAPIExample06.htm
├── FileAPIExample06Upload.php
├── GeolocationExample01.htm
├── PageVisibilityAPIExample01.htm
├── WebWorkerExample01.htm
├── WebWorkerExample01.js
└── smile.gif
├── README.md
└── readme.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
--------------------------------------------------------------------------------
/Ch03/AddExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Add Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/AddExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Add Example 2
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/AddExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Add Example 3
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/AssignmentOperatorsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Assignment Operators Example 1
5 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch03/BitwiseAndExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bitwise AND Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/BitwiseNotExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bitwise NOT Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/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/BooleanExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Boolean Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/BooleanExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Boolean Example 2
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/BreakStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Break Statement Example 1
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch03/BreakStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Break Statement Example 2
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch03/ConditionalOperatorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Conditional Operator Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/ContinueStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continue Statement Example 1
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch03/ContinueStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continue Statement Example 2
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch03/DivideExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Divide Example 1
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/DoWhileStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Do While Statement Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/EqualityOperatorsExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/EqualityOperatorsExample02.htm
--------------------------------------------------------------------------------
/Ch03/EqualityOperatorsExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/EqualityOperatorsExample03.htm
--------------------------------------------------------------------------------
/Ch03/ForInStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For-In Statement Example 1
5 |
6 |
7 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 1
5 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 3
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/ForStatementExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | For Statement Example 4
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 1
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 2
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 3
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 4
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 5
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 6
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample09.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 9
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/FunctionExample10.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Example 10
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/IfStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | If Statement Example 1
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/IfStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | If Statement Example 2
5 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch03/IncrementDecrementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Increment/Decrement Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch03/IncrementDecrementExample04.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/IncrementDecrementExample04.htm
--------------------------------------------------------------------------------
/Ch03/LeftShiftExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Left Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/LogicalAndExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical AND Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/LogicalAndExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical AND Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/LogicalNotExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical Not Example 1
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 |
--------------------------------------------------------------------------------
/Ch03/LogicalOrExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical OR Example 1
5 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/LogicalOrExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Logical OR Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/ModulusExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Modulus Example 1
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/MultiplyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Multiply Example 1
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/NullExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Null Example 1
5 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/NullExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Null Example 2
5 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch03/NumberExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 1
5 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch03/NumberExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 2
5 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch03/NumberExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/NumberExample03.htm
--------------------------------------------------------------------------------
/Ch03/NumberExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 4
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/NumberExample05.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/NumberExample05.htm
--------------------------------------------------------------------------------
/Ch03/NumberExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 6
5 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch03/NumberExample07.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/NumberExample07.htm
--------------------------------------------------------------------------------
/Ch03/NumberExample08.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Number Example 9
5 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch03/SignedRightShiftExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Signed Right Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/SignedRightShiftExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Signed Right Shift Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/StringExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Example 1
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/StringExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Example 2
5 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch03/StringExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Example 3
5 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 1
5 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 2
5 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 3
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch03/SwitchStatementExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Switch Statement Example 4
5 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch03/TypeofExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | typeof Example
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/UnaryPlusMinusExample01.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/UnaryPlusMinusExample01.htm
--------------------------------------------------------------------------------
/Ch03/UnaryPlusMinusExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch03/UnaryPlusMinusExample02.htm
--------------------------------------------------------------------------------
/Ch03/UndefinedExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 2
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 3
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch03/UndefinedExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Undefined Example 4
5 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch03/UnsignedRightShiftExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Unsigned Right Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/UnsignedRightShiftExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Unsigned Right Shift Example 1
5 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch03/WhileStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | While Statement Example 1
5 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch03/WithStatementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | With Statement Example 1
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch04/DeterminingTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Determining Type Example 1
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch04/DynamicPropertiesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dynamic Properties Example 1
5 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch04/DynamicPropertiesExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dynamic Properties Example 2
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 1
5 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 3
5 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 4
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 5
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 6
5 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch04/ExecutionContextExample07.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Execution Context Example 7
5 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch04/FunctionArgumentsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Arguments Example 1
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch04/FunctionArgumentsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Arguments Example 2
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayEveryAndSomeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array every() and some() Example
5 |
6 |
7 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch05/ArrayFilterExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array indexOf() Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayIndexOfExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array indexOf() Example
5 |
6 |
7 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch05/ArrayMapExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array map() Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayReductionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Reduction Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeConcatExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Concat Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 3
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 4
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 5
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 6
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample07.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 7
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample09.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 9
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample10.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 10
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample11.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 11
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample12.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 12
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample13.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 13
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeExample14.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Example 14
5 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeJoinExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Join Example
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch05/ArrayTypeSliceExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Array Type Slice Example
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/BooleanTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Boolean Type Example
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch05/DateNowExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Now Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/DateTypeConstructorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type Constructor Example
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/DateTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/DateTypeUTCExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type Example
5 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch05/DateTypeValueOfExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Date Type ValueOf() Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/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/FunctionDeclarationExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Example
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/FunctionInitializationExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Example
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeApplyMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type apply() Method Example
5 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeArgumentsCallerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Arguments Caller Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeArgumentsCallerExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Arguments Caller Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeArgumentsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Arguments Example
5 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeCallExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type call() Example
5 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeCallMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type call() Method Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeLengthPropertyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type Length Property Example
5 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ch05/FunctionTypeThisExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Type this Example
5 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch05/GlobalObjectURIDecodingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Global Object URI Decoding Example
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/GlobalObjectURIEncodingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Global Object URI Encoding Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch05/GlobalObjectWindowExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Global Object Window Example
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/MathObjectMinMaxExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Math Object Min/Max Example
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch05/MathObjectRoundingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Math Object Rounding Example
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch05/ObjectTypeExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Object Type Example 3
5 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch05/RegExpConstructorPropertiesExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp Constructor Properties Example 2
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/RegExpExecExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp exec() Example
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch05/RegExpTestExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp test() Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/RegExpToStringExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RegExp toString() Example
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch05/StringTypeCaseMethodExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Case Methods Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/StringTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Example
5 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch05/StringTypeFromCharCodeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type fromCharCode() Example
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch05/StringTypeLocationMethodsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Location Methods Example
5 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch05/StringTypeLocationMethodsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | String Type Location Methods Example 2
5 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch06/CreatingObjectsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Creating Objects 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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch06/PrototypeChainingExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch06/PrototypeChainingExample03.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch06/PrototypePatternExample02.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample03.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch06/PrototypePatternExample03.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample04.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch06/PrototypePatternExample04.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prototype Pattern Example
5 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample09.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch06/PrototypePatternExample09.htm
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample10.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prototype Pattern Example
5 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Ch06/PrototypePatternExample11.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prototype Pattern Example
5 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch07/BlockScopeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Block Scope Example
5 |
6 |
7 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch07/BlockScopeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Block Scope Example
5 |
6 |
7 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch07/BlockScopeExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Block Scope Example
5 |
6 |
7 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch07/FunctionDeclarationHoisting01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Hoisting Example
5 |
6 |
7 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch07/FunctionDeclarationsErrorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Declaration Error Example
5 |
6 |
7 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch07/FunctionNameExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Function Name Example
5 |
6 |
7 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch07/RecursionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Recursion Example
5 |
6 |
7 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch07/RecursionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Recursion Example
5 |
6 |
7 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Ch07/ThisObjectExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This Object Example
5 |
6 |
7 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch07/ThisObjectExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This Object Example 2
5 |
6 |
7 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch08/DeleteOperatorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Delete Operator Example
5 |
6 |
7 | Hello world!
8 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch08/FramesetExample01.htm:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Frameset Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Ch08/IntervalExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Interval Example
5 |
6 |
7 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch08/IntervalExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Interval Example 2
5 |
6 |
7 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch08/PluginDetectionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IE Plugin Detection Example
5 |
6 |
7 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch08/SystemDialogExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System Dialogs Example
5 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch08/SystemDialogExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System Dialogs Example 2
5 |
6 |
7 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch08/SystemDialogExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System Dialogs Example 3
5 |
6 |
7 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch08/TimeoutExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Timeout Example
5 |
6 |
7 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch08/TimeoutExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch08/TimeoutExample02.htm
--------------------------------------------------------------------------------
/Ch08/TimeoutExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Timeout Example 3
5 |
6 |
7 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/Ch08/WindowPositionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Position Example
5 |
6 |
7 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch08/WindowPositionExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Position Example 2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch08/WindowSizeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Window Size Example 2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch08/anotherframeset.htm:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Frameset Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch08/frameset1.htm:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Frameset Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch10/CommentNodeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Comment Node Example
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch10/CreateElementExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create Element Example
5 |
6 |
7 |
14 |
15 |
16 |
26 |
27 |
--------------------------------------------------------------------------------
/Ch10/DocumentWriteExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | document.write() Example
5 |
6 |
7 | The current date and time is:
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch10/DocumentWriteExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | document.write() Example 3
5 |
6 |
7 | No extra characters here:
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch10/ElementChildrenExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create Element Example
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch10/TextNodeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text Node Example
5 |
6 |
7 | Hello world!
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch10/TextNodeExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text Node Example 2
5 |
6 |
7 | Hello world!
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch11/CompareDocumentPositionExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CompareDocumentPosition Example
5 |
6 |
7 |
8 |
9 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch11/ContainsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Contains Example
5 |
6 |
7 |
8 |
9 |
10 |
17 |
18 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/InnerHtmlExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | InnerHtml Example
5 |
6 |
7 |
8 | This works in IE only.
9 |
10 |
11 |
19 |
20 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch12/CreateDocumentExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 CreateDocument Example
5 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch12/CreateHTMLDocumentExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 CreateHTMLDocument Example
5 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch12/DocumentTypeExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 DocumentType Example
5 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch12/IFrameElementExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 IFrame Example
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch12/IFrameElementExample2.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 IFrame Example
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch12/IFrameElementExample3.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 2 IFrame Example
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch12/UserDataExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | User Data Example
5 |
6 |
7 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Ch12/stylesheet1.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: silver;
3 | }
--------------------------------------------------------------------------------
/Ch12/stylesheet2.css:
--------------------------------------------------------------------------------
1 | a {
2 | color: navy;
3 | }
--------------------------------------------------------------------------------
/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/ButtonExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Button Example
5 |
6 |
7 |
8 | Click me
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/ClientCoordinatesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Client coordinates Example
5 |
6 |
7 |
8 | Click me
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch13/CrossBrowserEventObjectExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Cross-Browser Event Object Example
5 |
6 |
7 |
8 |
9 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/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/DOMEventObjectExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/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/DOMEventObjectExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/DOMEventObjectExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Event Object Example
5 |
6 |
7 |
8 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel0EventHandlerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 0 Event Handler Example
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel3KeyPropertyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 3 Key Property 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 |
--------------------------------------------------------------------------------
/Ch13/DOMLevel3LocationPropertyExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOM Level 3 Location Property Example
5 |
6 |
7 |
8 |
9 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch13/HTMLEventHandlerExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML Event Handler Example
6 |
7 |
8 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/Ch13/KeyDownEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keydown Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/KeyPressEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keypress Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/KeyUpEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keyup Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/KeyboardEventsExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Keyboard Events Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 | Load event example.
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 | Load event example.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample03.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample04.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample05.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Ch13/LoadEventExample06.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Load Event Example
5 |
6 |
7 |
8 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch13/ScreenCoordinatesExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Screen Coordinates Example
5 |
6 |
7 |
8 | Click me
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch13/example.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: red;
3 | }
--------------------------------------------------------------------------------
/Ch13/example.js:
--------------------------------------------------------------------------------
1 | function sayHi(){
2 | alert("hi!");
3 | }
--------------------------------------------------------------------------------
/Ch13/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch13/smile.gif
--------------------------------------------------------------------------------
/Ch14/blank.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Blank Page for Rich Text Editing
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch15/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch15/smile.gif
--------------------------------------------------------------------------------
/Ch15/smile2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch15/smile2.gif
--------------------------------------------------------------------------------
/Ch16/billyBrowsers.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch16/billyBrowsers.ogg
--------------------------------------------------------------------------------
/Ch16/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch16/smile.gif
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch17/InvalidCharacterExample02.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch17/InvalidCharacterExample02.htm
--------------------------------------------------------------------------------
/Ch17/LongURLErrorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Long URL Error Example (IE-only)
5 |
6 |
7 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Ch17/OnErrorExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OnError Example
5 |
6 |
7 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Ch17/OnErrorExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OnError Example
5 |
6 |
7 |
8 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch17/ThrowingErrorsExample02.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Throwing Errors Example
5 |
6 |
7 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Ch17/TryCatchExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Try-Catch Example
5 |
6 |
7 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Ch17/nonscript.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Ch17/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch17/smile.gif
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/employees.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Nicholas C. Zakas
5 |
6 |
7 | Jim Smith
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Ch18/employees.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 | ,
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch18/employees2.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 | Message:
13 |
14 |
15 |
16 | ,
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ch18/employees4.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ,
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Ch18/example.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Ch19/NamespaceExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Namespace Example
5 |
6 |
7 | This example only works in Firefox 1.5+.
8 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/QNameTypeExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | QName 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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch21/026694 Ch21code.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch21/026694 Ch21code.zip
--------------------------------------------------------------------------------
/Ch21/ImagePingExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Image Ping Example
5 |
6 |
7 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Ch21/JSONPExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JSONP Example
5 |
6 |
7 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch21/addcontact.php:
--------------------------------------------------------------------------------
1 |
9 | Contact Saved:
--------------------------------------------------------------------------------
/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 | ]
--------------------------------------------------------------------------------
/Ch21/altevents.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch21/example.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch21/example.txt:
--------------------------------------------------------------------------------
1 | Hello world!
--------------------------------------------------------------------------------
/Ch21/postexample.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch21/timeout.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch21/xdr.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Ch22/DragAndDropExample01.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Drag and Drop Example
5 |
6 |
7 |
8 |
9 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch22/RepeatingTimersExample.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Repeating Timers Example
5 |
6 |
7 |
8 |
9 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/a.js:
--------------------------------------------------------------------------------
1 | function A(){
2 |
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 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/b.js:
--------------------------------------------------------------------------------
1 | function B(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/dev/src/js/c.js:
--------------------------------------------------------------------------------
1 | function C(){
2 |
3 | }
--------------------------------------------------------------------------------
/Ch24/SampleAntDir/js/output-min.js:
--------------------------------------------------------------------------------
1 | function A(){}function B(){}function AA(){}function AB(){}function C(){};
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/Ch25/FileAPIExample06Upload.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 | };
--------------------------------------------------------------------------------
/Ch25/smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanglongde/book-professional-javascript-for-web-developers/d5a8174f32ad7cab8f3dc17a8a9b95f00a716cdd/Ch25/smile.gif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | example code from the book Professional JavaScript for Web Developers, 3rd Edition.
3 |
4 | 《JavaScript高级程序设计》 随书源码
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------