Hour 4. DOM Objects and Built-In Objects
What You’ll Learn in This Hour
• Talking to the user with alert(), prompt(), and confirm()
• Selecting page elements with getElementById()
• Accessing HTML content with innerHTML
• How to use the browser history object
• Reloading or redirecting the page using the location object
• Getting browser information via the navigator object
• Manipulating dates and times with the Date object
• Calculations made easier with the Math
object
In Hour 1, “Introducing JavaScript,” we talked a little about the DOM and introduced the top level object in the DOM tree, the window
object. We also looked at one of its child objects, document
.
In this hour, we introduce some more of the utility objects and methods that ...
Get Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.