HBCMS更多的中文手册参考:

repeatCount参数属性

DHTML中文手册

Retrieves the current iteration in the repetition loop.

dhtml语法

[ iIteration = ] currTimeState.repeatCount

DHTML可能的值

iIterationInteger that receives the current iteration in the repetition loop.

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

Remarks

This is a read-only property, exposed by the currtimestate object, that you can access at run-time to determine the current iteration of a repetition loop. a repetition loop is created by setting the repeatcount property.

DHTML代码范例

This example uses the repeatCount property to retrieve the current iteration.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
<SCRIPT LANGUAGE="JScript">
function fnRepeat()
{
oCount.innerText = "Current iteration: " +
(oAnim.currTimeState.repeatCount + 1);
// Add one because repeatCount is zero-based.
}
</SCRIPT>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000">
<DIV ID="oCount">Current iteration: 1</DIV>
<DIV ID="oDiv" CLASS="time" STYLE="position:relative;top:25px;left:50px;
height:100px;width:100px;background-color:blue;"></DIV>
<t:ANIMATEMOTION ID="oAnim" targetElement="oDIV" to="150,0"
begin="0;indefinite" dur="1" autoReverse="true" repeatCount="5"
onrepeat="fnRepeat()"/>
<BR><BR>
<BUTTON id="b1" onclick="oCount.innerText='Current iteration: 1';
oAnim.beginElement();">Click to restart</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, repeatDur