Lesson 134 – Introduction to the Document Object Model (DOM)
The DOM catalogues individual objects that we can select and manipulate.
Objects inside the DOM can have properties and methods.
- Properties describe something about the object.
- Methods are the things that the object can do.
The difference between a method and a function is that a method is something that an object can do. A method has to be associated with an object.
The button object has a number of properties such as:
The methods associated with the button object are:
Methods all end in a set of parenthesis that allow you to give it an input if needed.