SlideShare a Scribd company logo
JavaScript, Third Edition 
Chapter 5 
Introduction to the Document 
Object Model (DOM)
Objectives 
• Learn about dynamic Web pages 
• Study the Document Object Model (DOM) 
• Work with the Image object 
• Create animation with the Image object 
• Learn how to cache images 
JavaScript, Third Edition 2
Introduction 
JavaScript, Third Edition 3 
• Businesses want: 
– Web sites to include Formatting and images that can 
be updated without the user having to reload a Web 
page from the server 
– Innovative ways to use animation and interactive Web 
pages to attract and retain visitors 
– To make their Web sites effective and easy to navigate
Introduction (Cont.) 
• These kinds of effects: 
– Cannot be created with standard Extensible Hypertext 
Markup Language (XHTML) 
– Needs the use of Dynamic HTML (DHTML) 
• One of the most important aspects of DHTML is the 
Document Object Model (DOM) 
JavaScript, Third Edition 4
Creating Dynamic Web Pages 
JavaScript, Third Edition 5 
• Dynamic: 
– Web pages that respond to user requests through 
buttons or other kinds of controls 
– Various kinds of effects, such as animation, that 
appear automatically in a Web browser
Creating Dynamic Web Pages 
(Cont.) 
• A dynamic Web page can allow a user to: 
– Change the document background color 
– Submit a form and process a query 
– Participate in an online game or quiz 
JavaScript, Third Edition 6
Creating Dynamic Web Pages 
(Cont.) 
• To make Web pages truly dynamic, you need more 
than just XHTML 
– Need Dynamic HTML or (DHTML) 
JavaScript, Third Edition 7
Creating Dynamic Web Pages 
(Cont.) 
• Dynamic HTML (DHTML): 
– Refers to a combination of technologies that make 
Web pages dynamic 
• The term DHTML is: 
– Combination of JavaScript, XHTML, CSS, and the 
Document Object Model 
JavaScript, Third Edition 8
The Document Object Model 
• Is at the core of DHTML 
• Represents the Web page displayed in a window 
• Each element on a Web page is represented in the 
DOM by its own object 
• This makes it possible for a JavaScript program to: 
– Access individual elements on a Web page 
– Change elements individually, without having to 
reload the page from the server 
JavaScript, Third Edition 9
Document Object Properties 
JavaScript, Third Edition 10
Document Object Methods 
JavaScript, Third Edition 11
Document Object Methods (Cont.) 
JavaScript, Third Edition 12 
• Open() method: 
– Could be used to create a new document in a window 
or frame 
– Use the write() and writeln() methods to add content to 
the new document
Document Object Methods (Cont.) 
• The close() method: 
– Notifies the Web browser that 
• You are finished writing to the window or frame 
• The document should be displayed 
JavaScript, Third Edition 13
The Image Object 
• Represents an image created using the <img> element 
• Use to dynamically change an image displayed on a 
Web page 
• Image objects for each <img> element: 
– Assigned to elements of images[] array in the order 
they appear on the Web page 
JavaScript, Third Edition 14
The Image Object (Cont.) 
• An Image object contains various properties and 
events that you can use to manipulate your objects 
• The src property: 
– One of the most important parts of image object 
– Allows JavaScript to dynamically change an image 
– Changing assigned value also changes the src attribute 
associated with an <img> element 
• Dynamically changes an image displayed on a Web 
page 
JavaScript, Third Edition 15
The Image Object (Cont.) 
JavaScript, Third Edition 16
The Image Object (Cont.) 
JavaScript, Third Edition 17
Animation with the Image Object 
• You can create simple animation on a Web page: 
– Combine the src attribute of the Image object with the 
setTimeout() or setInterval() methods 
• Create an animated sequence with JavaScript by using: 
– The setInterval() or setTimeout() methods to cycle 
through the frames in an animation series 
– Each iteration of a setInterval() or setTimeout() method 
changes the frame displayed by an <img> element 
JavaScript, Third Edition 18
Image Caching 
• Technique for eliminating multiple downloads of the 
same file 
• Temporarily stores image files in memory on a local 
computer 
• Allows JavaScript to store and retrieve an image from 
memory rather than download the image each time it is 
needed 
JavaScript, Third Edition 19
Image Caching (Cont.) 
• Images are cached using the Image() constructor of 
the Image object 
– Creates new Image object 
• Three steps for caching an image in JavaScript: 
1. Create a new object using the Image() constructor 
2. Assign a graphic file to the src property of the new 
JavaScript, Third Edition 20 
Image object 
3. Assign the src property of the new Image object to 
the src property of an <img> element
Chapter Summary 
• Dynamic HTML (DHTML): 
– Combination of technologies that make Web pages 
dynamic 
– DHTML is a combination of JavaScript, XHTML, 
CSS, and the Document Object Model 
• Document Object Model, or DOM: 
– At the core of DHTML 
– Represents the Web page displayed in a window 
JavaScript, Third Edition 21
Chapter Summary (cont.) 
• The open() method: 
– Creates a new document in a window or frame 
• The close() method: 
– Notifies Web browser that you are finished writing to 
the window or frame and that the document should be 
displayed 
• An Image object: 
– Represents an image created using the <img> element 
JavaScript, Third Edition 22
Chapter Summary (cont.) 
JavaScript, Third Edition 23 
• Src property: 
– One of the most important properties of the Image 
object 
– Allows JavaScript to change an image dynamically
Chapter Summary (cont.) 
JavaScript, Third Edition 24 
• Image caching: 
– Technique for eliminating multiple downloads of the 
same file 
– Temporarily stores image files in memory 
– Allows JavaScript to store and retrieve an image from 
memory rather than downloading the image each time 
it is needed
Chapter Summary (cont.) 
• Onload event handler of the Image: 
– Use it to be certain that all images are downloaded into 
a cache before commencing an animation sequence 
JavaScript, Third Edition 25

More Related Content

PPT
Document Object Model
chomas kandar
 
PPT
Document Object Model
yht4ever
 
PPTX
Dom(document object model)
Partnered Health
 
PPTX
Introduction to DOM
Daniel Bragais
 
PPTX
Document Object Model (DOM)
GOPAL BASAK
 
PDF
JavaScript DOM & event
Borey Lim
 
Document Object Model
chomas kandar
 
Document Object Model
yht4ever
 
Dom(document object model)
Partnered Health
 
Introduction to DOM
Daniel Bragais
 
Document Object Model (DOM)
GOPAL BASAK
 
JavaScript DOM & event
Borey Lim
 

What's hot (20)

PPTX
Document object model
Amit kumar
 
PPTX
Dom
Surinder Kaur
 
PPTX
The Document Object Model
Khou Suylong
 
PPT
DHTML - Dynamic HTML
Reem Alattas
 
PPTX
Dhtml sohaib ch
Sohaib Chaudhery
 
PPTX
Document Object Model
Mayur Mudgal
 
PPTX
13. session 13 introduction to dhtml
Phúc Đỗ
 
PPTX
INTRODUCTION TO DOM AND DOM TREE
systematiclab
 
PPTX
Introduction to the DOM
tharaa abu ashour
 
PPTX
An Introduction to the DOM
Mindy McAdams
 
PPTX
Document object model(dom)
rahul kundu
 
PPTX
DHTML
Ravinder Kamboj
 
PPT
Dhtml chapter2
FLYMAN TECHNOLOGY LIMITED
 
PPT
Unit 2 dhtml
Sarthak Varshney
 
PPT
Dhtml
Prassonu
 
PPT
Dhtml
Soham Sengupta
 
PPT
DOM Quick Overview
Signure Technologies
 
PPTX
Understanding the dom by Benedict Ayiko
Damalie Wasukira
 
PDF
Javascript, DOM, browsers and frameworks basics
Net7
 
Document object model
Amit kumar
 
The Document Object Model
Khou Suylong
 
DHTML - Dynamic HTML
Reem Alattas
 
Dhtml sohaib ch
Sohaib Chaudhery
 
Document Object Model
Mayur Mudgal
 
13. session 13 introduction to dhtml
Phúc Đỗ
 
INTRODUCTION TO DOM AND DOM TREE
systematiclab
 
Introduction to the DOM
tharaa abu ashour
 
An Introduction to the DOM
Mindy McAdams
 
Document object model(dom)
rahul kundu
 
Unit 2 dhtml
Sarthak Varshney
 
Dhtml
Prassonu
 
DOM Quick Overview
Signure Technologies
 
Understanding the dom by Benedict Ayiko
Damalie Wasukira
 
Javascript, DOM, browsers and frameworks basics
Net7
 
Ad

Viewers also liked (8)

PPTX
14. session 14 dhtml filter
Phúc Đỗ
 
PPT
Dynamic HTML
Vinil Patel
 
PPTX
Dhtml
rahul kundu
 
PPTX
Dhtml
Sadhana28
 
PPTX
Dynamic HTML (DHTML)
Himanshu Kumar
 
DOC
Dbms lab questions
Parthipan Parthi
 
DOC
DBMS Practical File
Dushmanta Nath
 
DOC
Best sql plsql material
pitchaiah yechuri
 
14. session 14 dhtml filter
Phúc Đỗ
 
Dynamic HTML
Vinil Patel
 
Dhtml
Sadhana28
 
Dynamic HTML (DHTML)
Himanshu Kumar
 
Dbms lab questions
Parthipan Parthi
 
DBMS Practical File
Dushmanta Nath
 
Best sql plsql material
pitchaiah yechuri
 
Ad

Similar to introduction to the document object model- Dom chapter5 (20)

PPSX
Chapter09 slideshow2
hotbyte1
 
PPTX
Chapter09
hotbyte1
 
PDF
Introduction to Javascript
Seble Nigussie
 
PPTX
01 Introduction - JavaScript Development
Tommy Vercety
 
PPTX
DHTML.pptx Web Technologies IP University
22f3000894
 
PPTX
Javascript for web Programming creating and embedding with html
E.M.G.yadava womens college
 
PPTX
12. session 12 java script objects
Phúc Đỗ
 
PDF
Advanced guide to develop ajax applications using dojo
Fu Cheng
 
PDF
INTRODUCTION TO CLIENT SIDE PROGRAMMING
Prof Ansari
 
PPT
lecture 6 javascript event and event handling.ppt
ULADATZ
 
PDF
New Features Coming in Browsers (RIT '09)
jeresig
 
PPTX
It ppt.pptx
GurupreetSinghArora1
 
PPTX
WEB TECHNOLOGY Unit-4.pptx
karthiksmart21
 
PPTX
Web Technology Part 3
Thapar Institute
 
PPT
9781305078444 ppt ch05
Terry Yoast
 
PPTX
Modern Web Technologies
Perttu Myry
 
PPT
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
george.james
 
PPT
Ddpz2613 topic9 java
Mohamad Sahiedan
 
PDF
Java script
Ramesh Kumar
 
PPTX
JavaScript: Creative Coding for Browsers
noweverywhere
 
Chapter09 slideshow2
hotbyte1
 
Chapter09
hotbyte1
 
Introduction to Javascript
Seble Nigussie
 
01 Introduction - JavaScript Development
Tommy Vercety
 
DHTML.pptx Web Technologies IP University
22f3000894
 
Javascript for web Programming creating and embedding with html
E.M.G.yadava womens college
 
12. session 12 java script objects
Phúc Đỗ
 
Advanced guide to develop ajax applications using dojo
Fu Cheng
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
Prof Ansari
 
lecture 6 javascript event and event handling.ppt
ULADATZ
 
New Features Coming in Browsers (RIT '09)
jeresig
 
WEB TECHNOLOGY Unit-4.pptx
karthiksmart21
 
Web Technology Part 3
Thapar Institute
 
9781305078444 ppt ch05
Terry Yoast
 
Modern Web Technologies
Perttu Myry
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
george.james
 
Ddpz2613 topic9 java
Mohamad Sahiedan
 
Java script
Ramesh Kumar
 
JavaScript: Creative Coding for Browsers
noweverywhere
 

More from FLYMAN TECHNOLOGY LIMITED (20)

PPTX
Flyman Technology Limited Introduction Presentation
FLYMAN TECHNOLOGY LIMITED
 
PDF
Flyman Technology Limited (Mzumbe University Tanzania)
FLYMAN TECHNOLOGY LIMITED
 
PDF
Flyman Technology Limited Tanzania
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Saadani national park 2015
FLYMAN TECHNOLOGY LIMITED
 
PDF
Uuzaji wa mazao ya kuku wa asili
FLYMAN TECHNOLOGY LIMITED
 
PDF
Entrepreneurship manual BIT
FLYMAN TECHNOLOGY LIMITED
 
PPT
Security chapter6
FLYMAN TECHNOLOGY LIMITED
 
PPT
internet intranet and extranet
FLYMAN TECHNOLOGY LIMITED
 
PPT
introduction to web application development
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Marketing management
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Marketing communications
FLYMAN TECHNOLOGY LIMITED
 
PPT
Marketing analysis
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Market segmentation
FLYMAN TECHNOLOGY LIMITED
 
PPT
Consumer markets
FLYMAN TECHNOLOGY LIMITED
 
PDF
ENTREPRENEURSHIP MANUAL
FLYMAN TECHNOLOGY LIMITED
 
PPTX
THINGS NOT TO DO IN A JOB INTERVIEW!
FLYMAN TECHNOLOGY LIMITED
 
PPT
TAXATION CONCEPTS
FLYMAN TECHNOLOGY LIMITED
 
PDF
Html tutorial
FLYMAN TECHNOLOGY LIMITED
 
PPTX
SYSTEM MODELLING
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Structure system analysis and design method -SSADM
FLYMAN TECHNOLOGY LIMITED
 
Flyman Technology Limited Introduction Presentation
FLYMAN TECHNOLOGY LIMITED
 
Flyman Technology Limited (Mzumbe University Tanzania)
FLYMAN TECHNOLOGY LIMITED
 
Flyman Technology Limited Tanzania
FLYMAN TECHNOLOGY LIMITED
 
Saadani national park 2015
FLYMAN TECHNOLOGY LIMITED
 
Uuzaji wa mazao ya kuku wa asili
FLYMAN TECHNOLOGY LIMITED
 
Entrepreneurship manual BIT
FLYMAN TECHNOLOGY LIMITED
 
Security chapter6
FLYMAN TECHNOLOGY LIMITED
 
internet intranet and extranet
FLYMAN TECHNOLOGY LIMITED
 
introduction to web application development
FLYMAN TECHNOLOGY LIMITED
 
Marketing management
FLYMAN TECHNOLOGY LIMITED
 
Marketing communications
FLYMAN TECHNOLOGY LIMITED
 
Marketing analysis
FLYMAN TECHNOLOGY LIMITED
 
Market segmentation
FLYMAN TECHNOLOGY LIMITED
 
Consumer markets
FLYMAN TECHNOLOGY LIMITED
 
ENTREPRENEURSHIP MANUAL
FLYMAN TECHNOLOGY LIMITED
 
THINGS NOT TO DO IN A JOB INTERVIEW!
FLYMAN TECHNOLOGY LIMITED
 
TAXATION CONCEPTS
FLYMAN TECHNOLOGY LIMITED
 
SYSTEM MODELLING
FLYMAN TECHNOLOGY LIMITED
 
Structure system analysis and design method -SSADM
FLYMAN TECHNOLOGY LIMITED
 

Recently uploaded (20)

PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
The Future of Artificial Intelligence (AI)
Mukul
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 

introduction to the document object model- Dom chapter5

  • 1. JavaScript, Third Edition Chapter 5 Introduction to the Document Object Model (DOM)
  • 2. Objectives • Learn about dynamic Web pages • Study the Document Object Model (DOM) • Work with the Image object • Create animation with the Image object • Learn how to cache images JavaScript, Third Edition 2
  • 3. Introduction JavaScript, Third Edition 3 • Businesses want: – Web sites to include Formatting and images that can be updated without the user having to reload a Web page from the server – Innovative ways to use animation and interactive Web pages to attract and retain visitors – To make their Web sites effective and easy to navigate
  • 4. Introduction (Cont.) • These kinds of effects: – Cannot be created with standard Extensible Hypertext Markup Language (XHTML) – Needs the use of Dynamic HTML (DHTML) • One of the most important aspects of DHTML is the Document Object Model (DOM) JavaScript, Third Edition 4
  • 5. Creating Dynamic Web Pages JavaScript, Third Edition 5 • Dynamic: – Web pages that respond to user requests through buttons or other kinds of controls – Various kinds of effects, such as animation, that appear automatically in a Web browser
  • 6. Creating Dynamic Web Pages (Cont.) • A dynamic Web page can allow a user to: – Change the document background color – Submit a form and process a query – Participate in an online game or quiz JavaScript, Third Edition 6
  • 7. Creating Dynamic Web Pages (Cont.) • To make Web pages truly dynamic, you need more than just XHTML – Need Dynamic HTML or (DHTML) JavaScript, Third Edition 7
  • 8. Creating Dynamic Web Pages (Cont.) • Dynamic HTML (DHTML): – Refers to a combination of technologies that make Web pages dynamic • The term DHTML is: – Combination of JavaScript, XHTML, CSS, and the Document Object Model JavaScript, Third Edition 8
  • 9. The Document Object Model • Is at the core of DHTML • Represents the Web page displayed in a window • Each element on a Web page is represented in the DOM by its own object • This makes it possible for a JavaScript program to: – Access individual elements on a Web page – Change elements individually, without having to reload the page from the server JavaScript, Third Edition 9
  • 10. Document Object Properties JavaScript, Third Edition 10
  • 11. Document Object Methods JavaScript, Third Edition 11
  • 12. Document Object Methods (Cont.) JavaScript, Third Edition 12 • Open() method: – Could be used to create a new document in a window or frame – Use the write() and writeln() methods to add content to the new document
  • 13. Document Object Methods (Cont.) • The close() method: – Notifies the Web browser that • You are finished writing to the window or frame • The document should be displayed JavaScript, Third Edition 13
  • 14. The Image Object • Represents an image created using the <img> element • Use to dynamically change an image displayed on a Web page • Image objects for each <img> element: – Assigned to elements of images[] array in the order they appear on the Web page JavaScript, Third Edition 14
  • 15. The Image Object (Cont.) • An Image object contains various properties and events that you can use to manipulate your objects • The src property: – One of the most important parts of image object – Allows JavaScript to dynamically change an image – Changing assigned value also changes the src attribute associated with an <img> element • Dynamically changes an image displayed on a Web page JavaScript, Third Edition 15
  • 16. The Image Object (Cont.) JavaScript, Third Edition 16
  • 17. The Image Object (Cont.) JavaScript, Third Edition 17
  • 18. Animation with the Image Object • You can create simple animation on a Web page: – Combine the src attribute of the Image object with the setTimeout() or setInterval() methods • Create an animated sequence with JavaScript by using: – The setInterval() or setTimeout() methods to cycle through the frames in an animation series – Each iteration of a setInterval() or setTimeout() method changes the frame displayed by an <img> element JavaScript, Third Edition 18
  • 19. Image Caching • Technique for eliminating multiple downloads of the same file • Temporarily stores image files in memory on a local computer • Allows JavaScript to store and retrieve an image from memory rather than download the image each time it is needed JavaScript, Third Edition 19
  • 20. Image Caching (Cont.) • Images are cached using the Image() constructor of the Image object – Creates new Image object • Three steps for caching an image in JavaScript: 1. Create a new object using the Image() constructor 2. Assign a graphic file to the src property of the new JavaScript, Third Edition 20 Image object 3. Assign the src property of the new Image object to the src property of an <img> element
  • 21. Chapter Summary • Dynamic HTML (DHTML): – Combination of technologies that make Web pages dynamic – DHTML is a combination of JavaScript, XHTML, CSS, and the Document Object Model • Document Object Model, or DOM: – At the core of DHTML – Represents the Web page displayed in a window JavaScript, Third Edition 21
  • 22. Chapter Summary (cont.) • The open() method: – Creates a new document in a window or frame • The close() method: – Notifies Web browser that you are finished writing to the window or frame and that the document should be displayed • An Image object: – Represents an image created using the <img> element JavaScript, Third Edition 22
  • 23. Chapter Summary (cont.) JavaScript, Third Edition 23 • Src property: – One of the most important properties of the Image object – Allows JavaScript to change an image dynamically
  • 24. Chapter Summary (cont.) JavaScript, Third Edition 24 • Image caching: – Technique for eliminating multiple downloads of the same file – Temporarily stores image files in memory – Allows JavaScript to store and retrieve an image from memory rather than downloading the image each time it is needed
  • 25. Chapter Summary (cont.) • Onload event handler of the Image: – Use it to be certain that all images are downloaded into a cache before commencing an animation sequence JavaScript, Third Edition 25