DHTML Events
Fires at the end of each loop of a MARQUEE.
Inline HTML |
<MARQUEE onfinish = "handler" ... > |
All platforms |
Event property |
MARQUEE.onfinish = handler |
ECMA-262 Language Specification |
Named script |
<script FOR=MARQUEE EVENT=onfinish> |
Internet Explorer® only |
Bubbles |
No |
Cancels |
Yes |
To invoke |
Specify a value for the LOOP attribute of the MARQUEE object. |
Default action |
Marquee ceases looping. |
A value greater than one and less than infinity must be set on the LOOP attribute for this event to fire.
While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.
Event Object Properties
clientX |
Retrieves the x-coordinate of the position of the cursor when the mouse is clicked, relative to the size of the client area of the window but excluding window decorations or scroll bars. |
clientX |
Returns the y-coordinate of the position of the cursor when the mouse is clicked, relative to the size of the client area of the window but excluding window decorations or scroll bars. |
offsetX |
Retrieves the horizontal coordinate of the mouse's position relative to the object firing the event. |
offsetX |
Retrieves the vertical coordinate of the mouse's position relative to the object firing the event. |
returnValue |
Sets or retrieves the return value from the event. |
screenX |
Retrieves the horizontal position of the mouse, in pixels, relative to the user's screen. |
screenY |
Retrieves the vertical position of the mouse, in pixels, relative to the user's screen. |
srcElement |
Retrieves the object that fired the event. |
type |
Retrieves the event name from the event object. |
x |
Returns the horizontal position of the mouse when the event fires. |
y |
Returns the vertical position of the mouse when the event fires. |
The sample uses the srcElement property of the event object to determine which marquee has fired the onfinish event.
Sample Code
<div align="center">
<label>Looper1</label>
<marquee id="Looper1" loop="2"
onfinish="alert(event.srcElement.id +
' has finished looping.')">
This marquee loops twice</marquee>
<label>Looper2</label>
<marquee id="Looper2" loop="3"
onfinish="alert(event.srcElement.id +
' has finished looping.')">
This marquee loops thrice</marquee>
</div>
Show me
MARQUEE
loop, onbounce, onstart