HBCMS更多的中文手册参考:

RESTART Attribute | restart参数属性

DHTML中文手册

Sets or retrieves the conditions under which an element can be restarted on a timeline.

dhtml语法

HTML<ELEMENT RESTART = sAction... >
Scriptingobject.restart(action) [ = sAction ]

DHTML可能的值

sActionString that specifies or receives one of the following values.
alwaysDefault. Element can be restarted at any time.
neverElement cannot be restarted for the remaining duration of the parent time container.
whenNotActiveElement can be restarted only when it is not active on the timeline.

The property is read/write. The property has a default value of always.

Remarks

This property supersedes the eventrestart property.

DHTML代码范例

This example demonstrates each of the three values (always, never, whenNotActive) for the restart property. These values specify the conditions in which an element can be restarted on a timeline.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY>
<t:par id="tp1" begin="indefinite" dur="20">
<DIV id="div1" class="time"
style="position:absolute;top:255px;left:35px;width:100px;height:100px;
background-color:yellow; font-size:large; text-align:center;"
end="6" restart="never">DIV1<BR>'never'
</DIV>
<DIV id="div2" class="time"
style="position:absolute;top:255px;left:145px;width:100px;height:100px;
background-color:blue; font-size:large; text-align:center;"
begin="2" end="8" restart="always">DIV2<BR>'always'
</DIV>
<DIV id="div3" class="time"
style="position:absolute;top:255px;left:255px;width:100px;height:100px;
background-color:green; font-size:large; text-align:center;"
begin="4" end="10" restart="whenNotActive">DIV3<BR>'whenNotActive'
</DIV>
</t:par>
<P style="position:absolute; top:370px; left:45px;">
<BUTTON id="b0" onclick="tp1.beginElement();"
style="font-weight:bold;">Start</BUTTON>
<BUTTON id="b1" onclick="tp1.endElement();">Stop</BUTTON>&nbsp;&nbsp;
<BUTTON id="b2" onclick="div1.beginElement();alert('DIV1 cannot be restarted for the remaining duration of the parent time container (20 seconds).');">Restart DIV1</BUTTON>
<BUTTON id="b3" onclick="div2.beginElement();">Restart DIV2</BUTTON>
<BUTTON id="b4" onclick="div3.beginElement();">Restart DIV3</BUTTON>
</P>
</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 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

更多语法参考

Introduction to HTML+TIME