Sdílet prostřednictvím


resetElement Method

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Removes any changes made to the element and returns the element to its original state.

Syntax

object.resetElement()

Return Value

No return value.

Example

This example uses the resetElement method to demonstrate how to return an element to its original state.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>resetElement Method</TITLE>

<STYLE>
    .time { behavior: url(#default#time2) }
</STYLE>

<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="fixed" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

<t:excl ID="t1" repeatDur="indefinite" onbegin="b1.disabled=false;
    b2.disabled=true;"> 
    <DIV ID="div1" CLASS="time" BEGIN="0" DUR="5">First line displayed for 5
        seconds.</DIV>
    <DIV ID="div2" CLASS="time" BEGIN="5" DUR="5">Second line displayed for 5
        seconds.</DIV>
</t:excl>

<BR>
<BUTTON id="b1" 
    onclick="t1.endElementAt(5);
        alert('The time container will end at 5 seconds!');
        b2.disabled=false;b1.disabled=true;">End Timeline at 5 seconds</BUTTON>
<BUTTON id="b2"
    onclick="t1.resetElement();alert('No changes made to the timeline!');
        b2.disabled=true;b1.disabled=false;">Reset</BUTTON>
</BODY>
</HTML>

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/resetelement.htm

Applies To

t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:EXCL, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO

See Also

Introduction to HTML+TIME