The following code sets the identifier for a button named btn1 to 100. The identifier is a unique number that identifies the button. You can refer to the object either by its name or its identifier. If you have three buttons on a page, you can determine which button was clicked by checking the button's ID or name. The property above was set by directly accessing the ID attribute.
Some properties have properties, too.
Methods A method is a piece of code that an object calls to do something. In OOP, an object calls a method in response to some message that is sent to the object, in order to perform some task. Messages are the mechanism that is used in order for objects to communicate with each other. Microsoft's Windows operating systems rely heavily on this mechanism, sending messages to objects in order to notify the object that an event has occurred or that something should be done. You refer to the object by name and then to the method, and separate them by periods, and you include the extra data enclosed by parentheses.