home / experts / javascript / column67 |
|
Specifying the Beginning and Ending TimesYou must specify when the HTML element should appear and for how long. You accomplish it by theBEGIN and END element attributes. You can specify the duration of the element with respect to its beginning time, instead of the ending time. You accomplish it by the DUR attribute. BEGIN, END, and DUR have intuitive defaults. If you don't set the BEGIN attribute, an element will begin displaying when the page loads. If you don't specify the END or DUR attributes, it will remains displayed indefinitely.
The following example shows a slide presentation in which each slide appears and disappears on a predefined schedule. Try it first. We first specify the
The body of the page includes four IMG elements, one for every slide of the presentation. For the first slide, we define only the duration attribute. It will start displaying as soon as the page loads:
We specify HTML+TIME attributes in seconds. The second slide is designated to begin after 2 seconds, the third slide after 4 seconds, and the fourth slide after 6 seconds. All slides are due to disappear after 7 seconds. Here are the last three slides:
We use here the
Next: How to include an action |
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: August 28, 2000
Revised: August 28, 2000
URL: http://www.webreference.com/js/column67/4.html