Site_designer_ch30
Download
Report
Transcript Site_designer_ch30
Lesson 30:
JavaScript and DHTML
Fundamentals
Objectives
• Define and contrast client-side and server-side
technologies used to create dynamic content for Web
pages
• Use JavaScript dot notation to access X/HTML
objects
• Identify common JavaScript objects, properties and
methods
• Use JavaScript to detect browsers, redirect pages,
preload pages and confirm user choices
• Define Dynamic HTML (DHTML) and the
technologies it requires, and identify browser-specific
DHTML code for use with Microsoft Internet
Explorer, Netscape and Mozilla
JavaScript and Common
Programming Concepts
• Scripting languages
– Subsets of larger languages
• Objects
– Encapsulate predetermined attributes or
behaviors
• Properties
– Represent various attributes of the object
• Methods
– Actions an object can be made to perform
What Is JavaScript?
•
•
•
•
Scripting language
Object-based, not object-oriented
Event-driven
Strengths of JavaScript
– Quick development
– Easy to learn
– Platform independence
JavaScript vs. Other Languages
• JavaScript vs. Java
• JavaScript vs. VBScript
• JavaScript vs. JScript
– ECMA Script
Embedding JavaScript
into X/HTML
• The <script> tag
• Document <head> or <body> section
• Dot notation
Using JavaScript
to Communicate with the User
• The alert() method
• The prompt() method
– Concatenation
• The open() method
Using JavaScript
for Browser Detection
• The navigator object
• Sniffers and redirections
• Image preloading
Dynamic HTML (DHTML)
• DHTML and the Document Object Model
(DOM)
• DHTML limitations
• CSS and DHTML
• Scripting languages and DHTML
• DHTML implementation
• Cross-browser DHTML
Summary
Define and contrast client-side and server-side
technologies used to create dynamic content for Web
pages
Use JavaScript dot notation to access X/HTML
objects
Identify common JavaScript objects, properties and
methods
Use JavaScript to detect browsers, redirect pages,
preload pages and confirm user choices
Define Dynamic HTML (DHTML) and the
technologies it requires, and identify browser-specific
DHTML code for use with Microsoft Internet
Explorer, Netscape and Mozilla