|
January 30, 2000 Rotating Text Banners Tips: January 2000
Yehuda Shiran, Ph.D.
|
|
The following SPAN tag creates a simple container for a rotating text banner:
The ID attribute is similar to the NAME attribute in that it defines the HTML element's individual name. The ID attribute is used to reference the element in JavaScript. In Navigator, document.banner reflects the element, while document.all.banner, or simply banner, represents it in Internet Explorer. Microsoft and Netscape agree on CSS, but disagree on the object model. Navigator treats a positioned element as a new browser window, so you can write to its document object, whereas Internet Explorer features a property that reflects the element's inner content (innerHTML). The following function sets the content of a specific element:
In order to rotate our banner, we'll invoke this function in the following way:
Learn about the other parts of the rotating banner in column 3, Rotating Text Banners.
People who read this tip also read these tips: Look for similar tips by subject: |
| ||||||||||||||||||||