DHTML Events
Internet Explorer® 5 and up only.
Fires at the beginning of each loop of a MARQUEE.
Inline HTML |
<MARQUEE onstart = "handler" ... > |
All platforms |
Event property |
MARQUEE.onstart = handler |
ECMA-262 Language Specification |
Named script |
<script FOR=MARQUEE EVENT=onstart> |
Internet Explorer® only |
Bubbles |
No |
Cancels |
No |
To invoke |
- Set the LOOP attribute to 1 or higher.
- Omit the LOOP attribute so that the MARQUEE loops indefinitely.
|
Default action |
Initiates the next loop of the MARQUEE contents. |
The start method does not cause the onstart 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. |
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 example demonstrates the onstart event on a MARQUEE.
Sample Code
<body>
<div align="center">
<marquee id=theMarq onstart="alert(
'This alert will display each time the \n
marquee\'s ONSTART event fires.')"
behavior="alernate" loop="3">
This is a MARQUEE</marquee>
</div>
</body>
Show me
MARQUEE
behavior, loop, onbounce, onfinish