Chapter 6
Working with Objects
IN THIS CHAPTER
Understanding objects
Messing with object properties
Running object methods
Giving the Windows object a whirl
Interacting with your site visitors
The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
— JOE ARMSTRONG
JavaScript derives most of its power, flexibility, and utility from its extensive collection of methods for reading, changing, adding, and deleting web page doodads and bric-a-brac. It could be HTML elements, CSS properties, form controls, or internal programming resources such as strings and numbers. Whatever it is, JavaScript has an amazing and seemingly endless collection of powerful tools — called objects — that enable you to monitor and control almost every aspect of the web page. This chapter represents a major step forward in your JavaScript education as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access