pauseElement Method | DHTML中文手册 |
Stops playing an element's timeline at the current point.
dhtml语法
object.pauseElement()
Return Value
No return value.
Remarks
This method supersedes the pause method.
DHTML代码范例
The following example shows how to pause and resume a timeline using the pauseElement and resumeelement methods.
<HTML> <HEAD> <TITLE>Pause and Resume</TITLE> <?IMPORT namespace="t" implementation="#default#time2"> <STYLE> .time{ behavior: url(#default#time2); } .hiliteText{ color:#483D8B; font-weight:bold;} </STYLE> <SCRIPT> function doResume(){ oParent.resumeElement(); pauseBtn.disabled = false; resumeBtn.disabled = true; } function doPause(){ oParent.pauseElement(); pauseBtn.disabled = true; resumeBtn.disabled = false; } </SCRIPT> </HEAD> <BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000"> <TABLE ID="oParent" BORDER="1" CLASS="time" DUR="8s" REPEATCOUNT="indefinite" TIMECONTAINER="SEQ" TIMEACTION="none"> <TBODY> <TR> <TH WIDTH="120">Item</TH> <TH WIDTH="50">Code</TH> <TH WIDTH="40">Qty.</TH> </TR> <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s"> <TD>Apples</TD> <TD>A1</TD> <TD>7</TD> </TR> <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s"> <TD>Bananas</TD> <TD>B2</TD> <TD>23</TD> </TR> <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s"> <TD>Oranges</TD> <TD>O3</TD> <TD>12</TD> </TR> <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s"> <TD>Strawberries</TD> <TD>S4</TD> <TD>31</TD> </TR> </TBODY> </TABLE> <BR> <BUTTON ID="pauseBtn" onclick="doPause();">Pause</BUTTON> <BUTTON ID="resumeBtn" DISABLED="true" onclick="doResume();"> Resume</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:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO
更多语法参考
resumeelement, Introduction to HTML+TIME