onrepeat Event | DHTML中文手册 |
Fires when the timeline repeats on an element, beginning with the second iteration.
dhtml语法
Inline HTML <ELEMENT onrepeat = "handler" ... > All platforms Event property object.onrepeat = handler JScript only object.onrepeat = GetRef("handler") Visual Basic Scripting Edition (VBScript) 5.0 or later only Named script <SCRIPT FOR = object EVENT = onrepeat> Internet Explorer only
Event Information
Bubbles No Cancels No To invoke Set the repeatCount property to a value greater than 1. Default action Calls the associated event handler.
Available Properties
remarks
the event fires once for each repetition of the timeline, excluding the first full cycle. therefore, the onrepeat event fires repeatcount? times unless it is stopped by other dependencies before completion. this event fires only if the repeatcount or repeatdur property is set directly on the element. this event does not fire on child elements that have the repeatcount or repeatdur property set only on their parent elements.
DHTML代码范例
This example displays a message box that indicates the current repeat iteration every time the onrepeat event fires on a timeline.
<HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY BGCOLOR="white"> <SPAN ID="parent1" CLASS=time BEGIN="0" DUR="6" REPEATCOUNT="4" TIMELINE="par" TIMEACTION="display" onrepeat="alert('Current iteration: ' + parent1.currTimeState.repeatCount);"> <SPAN CLASS=time BEGIN="0" DUR="2">This text will be displayed for two seconds.</SPAN><BR> <SPAN CLASS=time BEGIN="3" DUR="4">This text will be displayed for four seconds.</SPAN> </SPAN> <SPAN CLASS="time" BEGIN="parent1.end">The End.</SPAN> </BODY> </HTML>
是否符合公共标准
This event is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) .
Applies To
t:TRANSITIONFILTER, t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:EXCL, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO
更多语法参考
Introduction to HTML+TIME