http://edu.chinaz.com/Get/Column/one/index.asp

解决方案 »

  1.   

    <!-- 以下是状态值 (f) 的说明:
    ' 0(未定义) 1(已停止播放) 2(已暂停播放) 3(正在播放中) 4(向前搜索) 5(向后搜索)
    ' 6(缓冲处理中) 7(等待中) 8(已播放完毕) 9(转换曲目中) 10(就绪状态)--><OBJECT ID="Player" width="320" height="240"
      CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
      <PARAM name="autoStart" value="True">
      <PARAM name="URL" value="">
    </OBJECT><SCRIPT>
    var current=0;
    var MusicURL= new Array           //这就是你说的数组?("http://w1ww.imy2.com/alian/164.wma","http://www.imy2.com/alian/164.wma","http://1hudi.vicp.net/yanglu/music/niyidingyaoxingfu.mp3");
    function play(current){
    var ExO = document.Player;
    ExO.URL = MusicURL[current];
    ExO.controls.play();
    if(ExO.PlayState==1) Next_One(current);
    }function Next_One(current){
    if (current<2)
    {
    current=current+1;
    }

    play(current);
    }
    play();