HBCMS更多的中文手册参考:

onbegin Event

DHTML中文手册

Fires when the timeline starts on an element.

dhtml语法

Inline HTML<ELEMENT onbegin = "handler" ... > All platforms
Event propertyobject.onbegin = handlerJScript only
object.onbegin = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onbegin> Internet Explorer only

Event Information

BubblesNo
CancelsNo
To invoke Set the element's begin time. The value of the element's begin time, which can depend on other elements, determines when the event actually fires.
Default action Calls the associated event handler.

Available Properties

Available Properties

remarks

this event also fires for the element when the beginelement method is invoked on it. this event does not fire when the timeline on the element has a repeatcount greater than one. however, it fires if the parent element's repeatcount is greater than one.

DHTML代码范例

In this example, the onbegin event fires immediately when the element's timeline begins.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>onbegin Event</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
.time {behavior:url(#default#time2);}
</STYLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000">
<t:excl id="t1" begin="indefinite" dur="5" repeatCount="5"
onbegin="alert('Beginning!');">
<t:ANIMATEMOTION ID="a1" targetElement="div1" to="200,0" begin="0" dur="2"
autoReverse="true" />
</t:excl>
<DIV ID="div1" CLASS="time"
STYLE="position:relative;top:15px;left:25px;height:100px;width:100px;
background-color:yellow;text-align:center;font-size:large;
border:solid black 1px">Moving DIV
</DIV>
<P style="position:relative;top:40px;left:45px;">
<BUTTON id="b1" onclick="t1.beginElement();">Start</BUTTON>
<BUTTON id="b4" onclick="t1.endElement();">Stop</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 event is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) 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

更多语法参考

onend, Introduction to HTML+TIME