Web hosting script - 355Chapter 15Generic HTML Element Objectstruck round doll red

355Chapter 15Generic HTML Element Objects truck round doll red ball pretty

Pat said, Oh my, the       is so      !

Related Items:oncopy, oncut, onbeforepasteevent handlers. onpropertychangeCompatibility:WinIE5+, MacIE-, NN-, Moz-, Safari- The onpropertychangeevent fires in WinIE5+ whenever a script modifies an object s prop- erty. This includes changes to the properties of an object s style. Changing properties by wayof the setAttribute()method also triggers this event. A script can inspect the nature of the property change because the event.propertyNameproperty contains the name (as a string) of the property that was just changed. In the case ofa change to an object s styleobject, the event.propertyNamevalue begins with style. as in style.backgroundcolor. You can use this event handler to localize any object-specific post-processing of changes toan object s properties. Rather than include the post-processing statements inside the func- tion that makes the changes, you can make that function generalized (perhaps to modifyproperties of multiple objects). ExampleListing 15-45 shows how you can respond programmatically to an object s properties beingchanged. The page generated by the listing contains four radio buttons that alter the innerHTMLand style.colorproperties of a paragraph. The paragraph s onpropertychangeevent handlerinvokes the showChange()function, which extracts information about the event and displaysthe data in the status bar of the window. Notice how the property name includes style.whenyou modify the stylesheet property. Listing 15-45: Using the onPropertyChange Property ContinuedelementObject.onpropertychange

Leave a Reply