344 Part III . (Web design portfolio) Document Objects Reference Properties
344 Part III . Document Objects Reference Properties activeElement Value: Object Reference Read-Only Compatibility NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 . IE5 . IE5.5 . In IE4+, a script can examine the document.activeElementproperty to see which element currently has focus. The value returned is an element object reference. You can use any of the properties and methods listed in Chapter 15 to find out more about the object. Be aware that not all elements in all operating systems receive focus. For example, buttons in IE4 for the Macintosh do not receive focus. Although the element used to generate a mouse or keyboard event will most likely have focus (except for IE4/Mac buttons), don t rely on the activeElement property to find out which element generated an event. The IE event.srcElement property is far more reliable. On the Example on the CD CD-ROM Related Items: event.srcElement property. alinkColor bgColor fgColor linkColor vlinkColor Value: Hexadecimal triplet or color name string Mostly Read/Write NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . . These five properties are the script equivalent of the
tag attributes of the same name (although the property names are case-sensitive). All five settings can be read via scripting, but the ability to change some or all of these properties varies widely with browser and client platform. Table 18-1 shows a summary of which browsers and platforms can set which of the color properties. document.alinkColorVisit our web design programs services for an affordable and reliable webhost to suit all your needs.