HBCMS更多的中文手册参考:

activeDur参数属性

DHTML中文手册

Retrieves the total duration of the timeline.

dhtml语法

[ iTime = ] currTimeState.activeDur

DHTML可能的值

iTimeInteger that receives the total duration of the timeline, in seconds.

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

Remarks

This property includes the repeatdur time and the effect of the autoreverse property, if applicable. for example, a timeline with a duration (dur) of five seconds, a repeatcount of 3, and autoreverse set to true would yield an activedur of 30 seconds.

DHTML代码范例

This example demonstrates how to use the activeDur property to retrieve the total duration of a timeline.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>activeDur Property</TITLE>
<SCRIPT>
function getActiveDur(){
var aDur = t1.currTimeState.activeDur;
alert('Total duration: ' + aDur + ' seconds.');
}
</SCRIPT>
<STYLE>
.time { behavior: url(#default#time2) }
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>
<BODY>
<!-- This timeline has a duration (dur) of three seconds, a repeatCount of 3,
and autoReverse set to true, yielding an activeDur value of 18 seconds. -->
<t:excl id="t1" dur="3" repeatcount="3" autoreverse="true">
<DIV ID="div1" CLASS="time" BEGIN="0" DUR="1">First line of text.</DIV>
<DIV ID="div2" CLASS="time" BEGIN="1" DUR="1">Second line of text.</DIV>
<DIV ID="div3" CLASS="time" BEGIN="2" DUR="1">Third line of text.</DIV>
</t:excl>
<BR>
<BUTTON id="b1" onclick="getActiveDur()">Get total duration of timeline.</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 property is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) Non-Microsoft link.

Applies To

currTimeState

更多语法参考

introduction to html+time, dur, mediadur, repeatdur, segmentdur, simpleDur