HBCMS更多的中文手册参考:

ontrackchange Event

DHTML中文手册

The event fires when a track changes in a playlist defined in an advanced stream redirector (asx) file.

dhtml语法

inline html<element ontrackchange = "handler" ... > All platforms
Event propertyobject.ontrackchange = handlerJScript only
object.ontrackchange = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = ontrackchange> Internet Explorer only

Event Information

BubblesNo
CancelsNo
To invoke Change track in a playList.
Default action Calls the associated event handler.

Available Properties

Available Properties

Examples

This is an example entry in an ASX file.

<ASX Version="1.0" PreviewMode="No" >
<entry>
<title>First title</title>
<author>Unknown 1</author>
<copyright>1998</copyright>
<abstract>WAV File</abstract>
<ref href=""/>
<banner href = "first_title.gif" >
<moreinfo href = "first_title.doc" />
<abstract>Visit the first abstract Web site</abstract>
</banner>
</entry>
</asx>

In the following example, the ontrackchange event fires when a user changes the track in the playlist by clicking the 'Previous Track' or 'Next Track' buttons.

...
function trackChange(){
banner1.innerText = event.Banner;
bannerabstract1.innerText = event.Abstract;
bannermoreinfo1.innerText = event.MoreInfo;
}
...
<t:media id="m1" src="../../common/samples/author/behaviors/media/media.asx"
onmediacomplete="updateBtns();updateFields();"
ontrackchange="trackChange();"/>
...
<B>Banner:</B>&nbsp;&nbsp;<SPAN id="banner1"></SPAN>
<BR>
<B>Abstract for banner:</B>&nbsp;&nbsp;<SPAN id="bannerabstract1"></SPAN>
<BR>
<B>More information on banner:</B>&nbsp;&nbsp;<SPAN id="bannermoreinfo1"></SPAN>
...
This feature requires Microsoft?Internet Explorer 6 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

applies to

t:AUDIO, t:MEDIA, t:REF, t:VIDEO

更多语法参考

Introduction to HTML+TIME