这个问题很郁闷啊,搞了好几天都没解决,不知道啥问题。求解,谢谢。JS的网页MP3连播功能,play.asp为播放页面。play.asp<div id=playlist>正在读取列表,请稍后.....</div><div>|<A onfocus="this.blur()" onclick="Last_OneOK();">上一首</A>|<A onfocus="this.blur()" onclick="Next_OneOK();">下一首</A>|</div><div>
<OBJECT id=haotingplay style="WIDTH: 100%; HEIGHT: 62px" type=application/x-oleobject border=0 classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6>
<PARAM NAME="URL" VALUE="">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
<PARAM NAME="currentPosition" VALUE="0">
<PARAM NAME="defaultFrame" VALUE="">
<PARAM NAME="playCount" VALUE="1">
<PARAM NAME="autoStart" VALUE="-1">
<PARAM NAME="currentMarker" VALUE="0">
<PARAM NAME="invokeURLs" VALUE="-1">
<PARAM NAME="baseURL" VALUE="">
<PARAM NAME="volume" VALUE="100">
<PARAM NAME="mute" VALUE="0">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="stretchToFit" VALUE="-1">
<PARAM NAME="windowlessVideo" VALUE="0">
<PARAM NAME="enabled" VALUE="-1">
<PARAM NAME="enableContextMenu" VALUE="true">
<PARAM NAME="fullScreen" VALUE="0">
<PARAM NAME="SAMIStyle" VALUE="">
<PARAM NAME="SAMILang" VALUE="">
<PARAM NAME="SAMIFilename" VALUE="">
<PARAM NAME="captioningID" VALUE="">
<PARAM NAME="enableErrorDialogs" VALUE="0">
<PARAM NAME="playState" VALUE="1">
</OBJECT>
</div><script src="Player.js"></script>
<SCRIPT>
Insertsong("goplay.asp?id=1|音乐1");
Insertsong("goplay.asp?id=2|音乐2");
Insertsong("goplay.asp?id=3|音乐3");SongList.options[0].selected=true;
haotingplayer();
</SCRIPT>
Play.js
var cookiestr;
var TotalSongs;
var title=window.document.title;
var isok=1;function Insertsong(songstr){
 var tstr;
 tstr = songstr.split("|");
 if(tstr.length == 2){
cookiestr = cookiestr + "#" + songstr;
InitList();
 }
}function killerror() {return true;}
window.onerror = killerror;
function InitList(){
 var songarray,htmlstr,i,j,tstr,ttstr,selectedindex;
 htmlstr = "<select name=\"SongList\" size=\"10\" style=\"WIDTH: 100%; COLOR: #039;\"  OnDblClick=\"haotingplayer();\">";
 songarray = cookiestr.split("#");
 TotalSongs = 0;
 for(i = 1;i < songarray.length;i++){
tstr = songarray[i].split("|");

 TotalSongs += 1;
 htmlstr += "<option value=\"" + songarray[i] + "\">";
 ttstr = TotalSongs + ".  " + tstr[1];

 htmlstr += ttstr + "</option>;";

 }
 htmlstr += "</select>";
 playlist.innerHTML = htmlstr;
}function haotingplayer(){
 if(SongList.selectedIndex < 0) alert('系统错误,请选择您要播放的音乐!');
 else{
var varvar,person,collect,song,url; varvar = SongList.options[SongList.selectedIndex].value.split("|");
//alert(varvar.length + "\n" + SongList.options[SongList.selectedIndex].value);
url = varvar[0];
song = varvar[1];
collect = varvar[2];
id = varvar[3]
window.document.title=varvar[1]+" - "+title; //MusicGeCi.innerHTML = "<a href=\"#\" onclick=\"javascript:window.open('http://www1.haoting.com/user/showgeci.asp?id=" + id  + "','webpage','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=530,top=100,left=550')\"><font color=#0078a1>点击查看正在播放的歌曲歌词</font></a>";
//xmlRequest(ht+url,doplay);
doplay(url);
//play1(1);
//URLTmp = PageBasicAddress + id;
return;
 }
}
function doplay(url){
haotingplay.URL=url;
haotingplay.controls.play();
play1(1);
isok=0;
showTLab();
}
function play1(num){
if (num==10)
{
alert("网络忙或者资源不存在,无法收听");
}
//document.getElementById("tbc").innerText=haotingplay.playState;
//if(haotingplay.playState !=3 && num<10){
if (haotingplay.playState==10&& num<10){
haotingplay.controls.play();
num++;
}
if (haotingplay.playState !=3&&haotingplay.playState !=6&&num<10){
setTimeout("play1("+num+")", 1000);
}
}function Last_OneOK(){  if((SongList.selectedIndex > 0) && (SongList.selectedIndex < TotalSongs)){
SongList.options[SongList.selectedIndex - 1].selected = true;
haotingplayer();
 }
}function Next_OneOK(){
 isok=1;  if(SongList.selectedIndex >= 0){
if(SongList.selectedIndex < TotalSongs - 1){
SongList.options[SongList.selectedIndex + 1].selected = true;
  haotingplayer();
}else{
SongList.options[0].selected = true;
  haotingplayer();
}
 }
}
function showTLab(){
 if(haotingplay.playState == 1 && isok==0) Next_OneOK();
 setTimeout("showTLab()", 1000);
}goplay.asp?id=xx<%
dim music_url
set rs=conn.execute("select * from m_list where id="&request("id"))
if not rs.eof then
music_url=rs("music_url")
end if
rs.close
set rs=nothing
conn.execute("update m_list set hits=hits+1 where id="&request("id"))response.write music_url
%>

问题来了,如果用response.write输入播放地址,可以在播放器中正常播放,每播放一次,那个数据库中的对应ID的播放次数+1,但不会播放完一首后跳到下一首,如果把response.write 改成response.redirect,结果可以播放完后会自动跳到一下首,但数据库中对应ID的播放次数连续+了两次,变成+2了,不知道什么问题,搞了几天都搞不好。如果我把这一段
Insertsong("goplay.asp?id=1|音乐1");
Insertsong("goplay.asp?id=2|音乐2");
Insertsong("goplay.asp?id=3|音乐3");
其中的goplay.asp?id=1直接用实际路径调用,用http://xxx.com/1.mp3这样来调用的话,能播完一首后自动跳到下一首,但是没办法统计播放次数。我想要播放完一首后自动跳到下一首,且要能正确统计播放次数,应该怎么搞?求教,谢谢。