endElement Method | DHTML中文手册 |
Stops the element on the timeline.
dhtml语法
object.endElement()
Return Value
No return value.
Remarks
This method applies the same action as would occur if the element's end time were reached on the local timeline, or if the element's duration (dur) had expired. all timed child elements are notified and aligned correctly to the local timeline. the endelement method fires the onend event.
DHTML代码范例
This example shows how to end a timeline using the endElement method.
<HTML XMLNS:t ="urn:schemas-microsoft-com:time"> <HEAD> <TITLE>endElement Method</TITLE> <STYLE> .time { behavior: url(#default#time2) } </STYLE> <?IMPORT namespace="t" implementation="#default#time2"> </HEAD> <BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="fixed" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000"> <B>Timer:</B> <span id="Timer" class="time" dur=".01" repeatCount="indefinite" fill="hold" onrepeat="innerText=parseInt(t1.currTimeState.activeTime);">0</span> <BR><BR> <t:excl ID="t1" repeatDur="indefinite"> <DIV ID="div1" CLASS="time" BEGIN="0" DUR="3">First line displayed for 3 seconds.</DIV> <DIV ID="div2" CLASS="time" BEGIN="3" DUR="3">Second line displayed for 3 seconds.</DIV> </t:excl> <BR> <BUTTON id="b1" onclick="t1.endElement()">End Timeline!</BUTTON> </BODY> </HTML>
是否符合公共标准
This method is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 .
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
更多语法参考
beginelement, endelementat, Introduction to HTML+TIME