HBCMS更多的中文手册参考:

activeTime参数属性

DHTML中文手册

Retrieves the current point in time along the total active timeline, including repeats and time spent in reverse mode.

dhtml语法

[ iTime = ] currTimeState.activeTime

DHTML可能的值

iTimeInteger that receives the current point in time along the timeline, in seconds. The value of this property ranges from 0 to activeDur.

The property is read-only. The property has no default value.

Remarks

This property supersedes the currtime property.

the activetime property contains the time elapsed since the timeline for the object began, including time spent repeating and in reverse mode. run the example below and note how activetime accumulates throughout the entire duration of the timeline.

DHTML代码范例

This example shows how activeTime, segmenttime, and simpletime relate to each other.

<html xmlns:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>autoReverse Example</TITLE>
<STYLE>
.time{behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
<SCRIPT LANGUAGE="JScript">
window.onload = fnOnLoad;
function fnOnLoad()
{
// Set up a timer to watch the time values.
window.setInterval(fnUpdateTimes, 100);
}
function fnUpdateTimes()
{
oSimpleTime.innerHTML = "&nbsp;simpleTime:&nbsp;" +
(oAnim.currTimeState.simpleTime);
oSegmentTime.innerHTML = "segmentTime:&nbsp;" +
(oAnim.currTimeState.segmentTime);
oActiveTime.innerHTML = "&nbsp;activeTime:&nbsp;" +
(oAnim.currTimeState.activeTime);
}
function fnRepeat()
{
oRepeatCount.innerHTML = "repeatCount:&nbsp;" +
(oAnim.currTimeState.repeatCount + 1);
// Add one because repeatCount is zero-based.
}
</SCRIPT>
</HEAD>
<BODY>
<DIV STYLE="font-family:courier;">
<DIV ID="oRepeatCount">repeatCount: 1</DIV>
<DIV ID="oSimpleTime">&nbsp;simpleTime:&nbsp;0</DIV>
<DIV ID="oSegmentTime">segmentTime:&nbsp;0</DIV>
<DIV ID="oActiveTime">&nbsp;activeTime:&nbsp;0</DIV>
</DIV>
<DIV ID="oDiv" CLASS="time" STYLE="position:absolute; left:50px;
top:250px; width:100px; height:100px; background-color:blue;"></DIV>
<t:ANIMATEMOTION ID="oAnim" targetElement="oDIV" to="340,40" dur="2"
autoReverse="true" repeatCount="5" onrepeat="fnRepeat()" fill="freeze"/>
</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 property is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) Non-Microsoft link.

Applies To

currTimeState

更多语法参考

segmenttime, simpletime, Introduction to HTML+TIME