DHTML Events
Internet Explorer® 5 and up only.
Fires when the behavior property of the MARQUEE object is set to "alternate" and the contents of the marquee reach a side.
Inline HTML |
<MARQUEE onbounce = "handler" ... > |
All platforms |
Event property |
MARQUEE.onbounce = handler |
ECMA-262 Language Specification |
Named script |
<script FOR=object EVENT=onbounce> |
Internet Explorer® only |
Bubbles |
No |
Cancels |
Yes |
To invoke |
Cause the MARQUEE contents to loop. |
Default action |
The MARQUEE contents begin to scroll in the opposite direction. |
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 following example displays an alert each time the onbounce event occurs.
Sample Code
<body>
<marquee id=theMarq behavior=alternate loop=3
onbounce="alert('As the MARQUEE reaches its edge,
\nthe ONBOUNCE event fires.')">
This is a MARQUEE</marquee>
</body>
Show me
MARQUEE
behavior, onstart, onfinish