HBCMS更多的中文手册参考:

prevTrack Method

DHTML中文手册

Sets the media-playing container to the previous track, or playitem object, in the playlist collection and begins playing that track.

dhtml语法

object.prevtrack()

return value

no return value.

remarks

using this method on the first track in the playlist causes that track to restart.

dhtml代码范例

<html xmlns:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>nextTrack and prevTrack Methods</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
function updateBtns() {
if(m1.currTimeState.isActive){
b0.disabled=true;
b1.disabled=false;
b2.disabled=false;
b3.disabled=false;
}else{
b0.disabled=false;
b1.disabled=true;
b2.disabled=true;
b3.disabled=true;
}
}
function updateFields(){
title1.innerText = 'Title: ' + m1.playList.activeTrack.title;
author1.innerText = 'Author: ' + m1.playList.activeTrack.author;
abstract1.innerText = 'Abstract: ' + m1.playList.activeTrack.abstract;
copyright1.innerText = 'Copyright: ' + m1.playList.activeTrack.copyright;
}
function emptyFields(){
title1.innerText = 'Title: ';
author1.innerText = 'Author: ';
abstract1.innerText = 'Abstract: ';
copyright1.innerText = 'Copyright: ';
}
</SCRIPT>
</HEAD>
<BODY onload="updateBtns()" TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED"
BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000">
...
<t:media id="m1" begin="0;indefinite;"
src="../../common/samples/author/behaviors/media/media.asx"
onmediacomplete="updateFields();updateBtns();"/>
<span id="title1">Title:</span><BR>
<span id="author1">Author:</span><BR>
<span id="abstract1">Abstract:</span><BR>
<span id="copyright1">Copyright</span><BR><BR>
<BUTTON id="b0" onclick="m1.beginElement();updateFields();updateBtns();">
Start</BUTTON>
<BUTTON id="b1" onclick="m1.playList.nextTrack();updateFields();">
Next Track</BUTTON>
<BUTTON id="b2" onclick="m1.playList.prevTrack();updateFields();">
Previous Track</BUTTON>
<BUTTON id="b3" onclick="m1.endElement();emptyFields();updateBtns();">
Stop</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 method is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) Non-Microsoft link.

Applies To

playList, t:MEDIA, t:PAR, t:REF, t:SEQ

更多语法参考

introduction to html+time, activetrack, nextTrack