Figure 2 contains the syntax for these and other tags. These properties and methods can be accessed from within your HTC script and from the containing HTML page. Now instead of setting the color to red in onmouseover, I'll set the color to hiliteColor. I'll need to handle this case by attaching to the window's onload event. In this example, the text color used for highlighting will be green instead of red.
Methods are just as easy to add as properties.
Let's add a method capable of changing the highlight color used by the behavior. You can call this method from the script code in your HTC document or from the containing HTML page. Although this is a very trivial example, you can take advantage of more sophisticated methods to add powerful capabilities to your behaviors. The tag specifies the name and ID of the event to be fired by your behavior. The name specifies the name of the method to be called when the event fires.