HBCMS更多的中文手册参考:

beginElementAt Method

DHTML中文手册

Starts an element's timeline at the specified time.

dhtml语法

object.beginElementAt(iSeconds)

Parameters

iSeconds Required. String that specifies the point along the element's parent timeline at which to start playing the element.

Return Value

No return value.

Remarks

The element's timeline will start at the time specified by the beginElementAt method if beginElementAt is invoked at any time before the parent element reaches that specified time. Otherwise, the element's timeline will start immediately. If beginElementAt is invoked on an element's timeline more than once with a value that is the same or less than the previous value used, it will be ignored.

DHTML代码范例

This example shows how to use the beginElementAt method to start an element's timeline at a specified time.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>beginElementAt Method</TITLE>
<SCRIPT>
function doBegin(){
<!-- Validate input from user. -->
if(secondToStart.value<=document.body.currTimeState.activeTime
|| secondToStart.value==null){
alert('Must be an integer greater than document timer value!\nPlease enter value again.');
secondToStart.value='';
secondToStart.focus();
return;
}
t1.beginElementAt(secondToStart.value);
}
</SCRIPT>
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000"
VLINK="#808080" ALINK="#000000">
<B>Document Timer:</B>
<SPAN id="Timer" class="time" dur=".01" repeatCount="indefinite" fill="hold"
onrepeat="innerText=parseInt(document.body.currTimeState.activeTime);">0</SPAN><BR>
<B>Time Container Timer:</B>
<SPAN id="Timer" class="time" dur=".01" repeatCount="indefinite" fill="hold"
onrepeat="innerText=parseInt(t1.currTimeState.activeTime);">0</SPAN><BR><BR>
<!-- The time container begins upon document.body.onload. By entering a value
in the begin element input box, you cause the time container to
start over at a certain time in the document.body.currTimeState.activeTime.-->
<t:excl id="t1" begin="0" class="time" dur="27">
<DIV id="s1" CLASS="time" STYLE="Color:Red; font-size:20pt;" begin="1" DUR="5">
First line displayed for 5 seconds.</DIV>
<DIV id="s2" CLASS="time" STYLE="Color:Green; font-size:20pt;" begin="6" DUR="5">
Second line displayed for 5 seconds.</DIV>
<DIV id="s3" CLASS="time" STYLE="Color:Blue; font-size:20pt;" begin="11" DUR="5">
Third line displayed for 5 seconds.</DIV>
<DIV id="s4" CLASS="time" STYLE="Color:Orange; font-size:20pt;" begin="16" DUR="5">
Fourth line displayed for 5 seconds.</DIV>
<DIV id="s5" CLASS="time" STYLE="Color:Purple; font-size:20pt;" begin="21" DUR="5">
Last line displayed </DIV>
</t:excl>
Point in document time to start (must be a positive integer):
<INPUT type="number" name="secondToStart" size="3" />
<BUTTON ID="b1" onclick="doBegin()">Click here</BUTTON>
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

This method is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 Non-Microsoft link.

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

更多语法参考

beginelement, endelementat, Introduction to HTML+TIME