高手们,解决了,我这里还有300分.重要你能解决tttttttttttttt

解决方案 »

  1.   

    /////……/////间为修改增加部分
    <HTML>
    <HEAD>
    <TITLE>歌曲列表</TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    /** 系统用脚本定义开始,普通用户不建议修改 **/
    function Song(a, b)
    {
    this.Name = a ;
    this.URL = b ;
    }
    function Music()
    {
    this.m_pMusic = new Array() ;
    this.GetCount = function(){return this.m_pMusic.length;}
    this.Add = function(a, b)
    { var obj = new Song(a, b) ;
    this.m_pMusic[this.GetCount()] = obj ;
    }
    this.GetMusic = function(n){return this.m_pMusic[n];}
    this.SortOnName = function(a, b)
    { var n1 = a.Name.length ;
    var n2 = b.Name.length ;
    if(n1 == n2) return 0; 
    if(n1 < n2) return -1; 
    if(n1 > n2) return 1;
    }
    this.Sort = function() {this.m_pMusic.sort(this.SortOnName);}
    }
    function GoMusic(n)
    { if(document.form1.rd1.checked)
    {
    var strUser = top.document.f1.ToWho.value ;
    if( strUser != '大家')
    {
    if(confirm("你决定送这首歌给 [" + strUser + "] 吗?"))
    {
    top.document.f1.SAYS.value = "##music " + MusicBox.GetMusic(n).Name + MusicBox.GetMusic(n).URL ;
    top.document.f1.submit() ; // 自动提交 }
    return ;
    }else
    {
    alert("不能给 大家 送歌!")

    }
    }else
    {
    if(confirm("你给自己点了一首歌曲,立即播放吗?"))
    {
    top.Play(MusicBox.GetMusic(n).URL);
    }
    top.setFocus();
    return ;
    }
    }function Loop(n)
    { if(n != 0)
    { top.MLoop = n ;
    }else
    { top.music.document.open();
    top.music.document.writeln("<HTML><BODY></BODY></HTML>") ;
    top.music.document.close(); return ;
    }
    }function OnControl(n)
    {
    switch(n)
    {
    case "0":
    break ;
    case "100":
    Loop(0);
    break;
    case "99":
    Loop(-1);
    break;
    case "101":
    var loop = prompt("请设定音乐播放的次数,1至99为有效值,-1表示不限次数!",top.MLoop) ;
    if(loop != null && loop < 100) Loop(loop);
    break;
    default:
    top.Play(n) ;
    break;
    }
    document.form1.SELECT1.value = '0' ;
    }
    /////////////////////
    function mysel(myobj)
    {
    aHtml="";
    count=0;
    if(myobj.value!=0)
    {
    if(myobj.value==1)
    MusicBox=MusicBox1;
    else if(myobj.value==2)
    MusicBox=MusicBox2;
    else if(myobj.value==3)
    MusicBox=MusicBox3;count=MusicBox.GetCount();
    for(var i = 0; i < MusicBox.GetCount(); i++)
    { obj = MusicBox.GetMusic(i) ;
    aHtml+="<a href='javascript:GoMusic(" + i + ")'>"+obj.Name+"</a><br>";
    }
    }
    disc.innerHTML=myobj.value;
    musiccount.innerHTML=count;
    musiclist.innerHTML=aHtml;
    }
    /** 系统用脚本定义结束 **/
    var MusicBox = new Music() ;
    var MusicBox1 = new Music() ;
    MusicBox1.Add("今天夜里总下雨8K ","<%IMGURL%>/music/music1/CHX/stillr.mid");
    MusicBox1.Add("可曾记起我33K ","<%IMGURL%>/music/music1/CHX/rmmbrme.mid");
    MusicBox1.Add("留恋11K ","<%IMGURL%>/music/music1/CHX/stilllov.mid");
    MusicBox1.Add("千千阕歌17K ","<%IMGURL%>/music/music1/CHX/1000song.mid");
    var MusicBox2 = new Music() ;
    MusicBox2.Add("天荒爱未老13K ","<%IMGURL%>/music/music1/ZHM/lasting.mid");
    MusicBox2.Add("外外留情29K ","<%IMGURL%>/music/music1/ZHM/leavelov.mid");
    MusicBox2.Add("知己25K ","<%IMGURL%>/music/music1/ZHM/clsefrnd.mid");
    var MusicBox3 = new Music() ;
    MusicBox3.Add("秋色18K ","<%IMGURL%>/music/music1/CHX/autumn.mid");
    MusicBox3.Add("傻女15K ","<%IMGURL%>/music/music1/CHX/foolgirl.mid");
    MusicBox3.Add("夜机16K ","<%IMGURL%>/music/music1/CHX/nightpln.mid");
    MusicBox3.Add("别让我恨你20K ","<%IMGURL%>/music/music1/CJY/hateyou.mid");
    MusicBox3.Add("最爱16K ","<%IMGURL%>/music/music1/ZHM/mostlove.mid");
    //////////////////////
    </script>
    <style type="text/css">
    <!--
    body {  font-family: "宋体"; font-size: 9pt; line-height: 13pt}
    table{  font-family: "宋体"; font-size: 9pt; }
    select { BACKGROUND-COLOR: #efefef; COLOR: black; FONT-FAMILY: 宋体; FONT-SIZE: 9pt; Border-width: 1px;}
    a:visited {  color: #0000FF; text-decoration: none}
    a:link {  color: #CCFFCC; text-decoration: none}
    a:hover {  color: #FF0000}
    .music { color: #191970 }
    -->
    </style>
    </HEAD>
    <body oncontextmenu=self.event.returnValue=false bgcolor="#88A0D7" topmargin="0" leftmargin="0">
    <table height="100%" border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr><td width="1" bgcolor=black>
    </td><td>
    <table height="100%" border="0" width="100%" cellspacing="2" cellpadding="3">
    <tr><td height="2"> </td>
    <tr><td valign=top><form name=form1>
    <Div align=center>
    <SELECT name="SELECT2" onchange=mysel(this)>
    <OPTION value="0">==选择专辑==</OPTION>
    <OPTION value="1">==音乐专辑1=</OPTION>
    <OPTION value="2">==音乐专辑2=</OPTION>
    <OPTION value="3">==音乐专辑3=</OPTION>
    </SELECT>
    <BR>
    <SELECT name="SELECT1" onchange="OnControl(this.value)">
    <OPTION value="0">==音乐控制==</OPTION>
    <OPTION value="100">停止播放音乐</OPTION>
    <OPTION value="101">设定播放次数</OPTION>
    <OPTION value="99">无限循环播放</OPTION>
    <OPTION value="0" style="BACKGROUND:darkblue; COLOR:white;">==播放列表==</OPTION>
    </SELECT>
    <BR>
    </DIV>
    [专辑 <font color=green><span id=disc>0</span></font> 共: <font color=#ff5555><span id=musiccount>0</span></font> 首歌曲]
    <HR color="#FFFF00" size="1">
    <INPUT type="radio" id=rd1 name=rd>送人
    <INPUT type="radio" id=rd2 name=rd checked>欣赏
    <HR color="#FFFF00" size="1">
    <div id=musiclist>
    </div>
    <HR color="#FFFF00" size="1">
                  <font size="5"><b><font color="#FF0000">如果合乎你的要求,就请加分吧,300?多多益善哦!</font></b></font> 
                </form>
    </td></tr></table></td></tr></table>
    </BODY>
    </HTML>
      

  2.   

    <HTML>
    <HEAD>
    <TITLE>歌曲列表</TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    /** 系统用脚本定义开始,普通用户不建议修改 **/
    function Song(a, b)
    {
    this.Name = a ;
    this.URL = b ;
    }
    function Music()
    {
    this.m_pMusic = new Array() ;
    this.GetCount = function(){return this.m_pMusic.length;}
    this.Add = function(a, b)
    { var obj = new Song(a, b) ;
    this.m_pMusic[this.GetCount()] = obj ;
    }
    this.GetMusic = function(n){return this.m_pMusic[n];}
    this.SortOnName = function(a, b)
    { var n1 = a.Name.length ;
    var n2 = b.Name.length ;
    if(n1 == n2) return 0; 
    if(n1 < n2) return -1; 
    if(n1 > n2) return 1;
    }
    this.Sort = function() {this.m_pMusic.sort(this.SortOnName);}
    }
    function GoMusic(n)
    { if(document.form1.rd1.checked)
    {
    var strUser = top.document.f1.ToWho.value ;
    if( strUser != '大家')
    {
    if(confirm("你决定送这首歌给 [" + strUser + "] 吗?"))
    {
    top.document.f1.SAYS.value = "##music " + MusicBox.GetMusic(n).Name + MusicBox.GetMusic(n).URL ;
    top.document.f1.submit() ; // 自动提交 }
    return ;
    }else
    {
    alert("不能给 大家 送歌!")

    }
    }else
    {
    if(confirm("你给自己点了一首歌曲,立即播放吗?"))
    {
    top.Play(MusicBox.GetMusic(n).URL);
    }
    top.setFocus();
    return ;
    }
    }function Loop(n)
    { if(n != 0)
    { top.MLoop = n ;
    }else
    { top.music.document.open();
    top.music.document.writeln("<HTML><BODY></BODY></HTML>") ;
    top.music.document.close(); return ;
    }
    }function OnControl(n)
    {
    switch(n)
    {
    case "0":
    break ;
    case "100":
    Loop(0);
    break;
    case "99":
    Loop(-1);
    break;
    case "101":
    var loop = prompt("请设定音乐播放的次数,1至99为有效值,-1表示不限次数!",top.MLoop) ;
    if(loop != null && loop < 100) Loop(loop);
    break;
    default:
    top.Play(n) ;
    break;
    }
    document.form1.SELECT1.value = '0' ;
    }
    /////////////////////
    function mysel(myobj)
    {
    aHtml="";
    count=0;
    if(myobj.value!=0)
    {
    if(myobj.value==1)
    MusicBox=MusicBox1;
    else if(myobj.value==2)
    MusicBox=MusicBox2;
    else if(myobj.value==3)
    MusicBox=MusicBox3;count=MusicBox.GetCount();
    for(var i = 0; i < MusicBox.GetCount(); i++)
    { obj = MusicBox.GetMusic(i) ;
    aHtml+="<a href='javascript:GoMusic(" + i + ")'>"+obj.Name+"</a><br>";
    }
    }
    disc.innerHTML=myobj.value;
    musiccount.innerHTML=count;
    musiclist.innerHTML=aHtml;
    }
    /** 系统用脚本定义结束 **/
    var MusicBox = new Music() ;
    var MusicBox1 = new Music() ;
    MusicBox1.Add("今天夜里总下雨8K ","<%IMGURL%>/music/music1/CHX/stillr.mid");
    MusicBox1.Add("可曾记起我33K ","<%IMGURL%>/music/music1/CHX/rmmbrme.mid");
    MusicBox1.Add("留恋11K ","<%IMGURL%>/music/music1/CHX/stilllov.mid");
    MusicBox1.Add("千千阕歌17K ","<%IMGURL%>/music/music1/CHX/1000song.mid");
    var MusicBox2 = new Music() ;
    MusicBox2.Add("天荒爱未老13K ","<%IMGURL%>/music/music1/ZHM/lasting.mid");
    MusicBox2.Add("外外留情29K ","<%IMGURL%>/music/music1/ZHM/leavelov.mid");
    MusicBox2.Add("知己25K ","<%IMGURL%>/music/music1/ZHM/clsefrnd.mid");
    var MusicBox3 = new Music() ;
    MusicBox3.Add("秋色18K ","<%IMGURL%>/music/music1/CHX/autumn.mid");
    MusicBox3.Add("傻女15K ","<%IMGURL%>/music/music1/CHX/foolgirl.mid");
    MusicBox3.Add("夜机16K ","<%IMGURL%>/music/music1/CHX/nightpln.mid");
    MusicBox3.Add("别让我恨你20K ","<%IMGURL%>/music/music1/CJY/hateyou.mid");
    MusicBox3.Add("最爱16K ","<%IMGURL%>/music/music1/ZHM/mostlove.mid");
    //////////////////////
    </script>
    <style type="text/css">
    <!--
    body {  font-family: "宋体"; font-size: 9pt; line-height: 13pt}
    table{  font-family: "宋体"; font-size: 9pt; }
    select { BACKGROUND-COLOR: #efefef; COLOR: black; FONT-FAMILY: 宋体; FONT-SIZE: 9pt; Border-width: 1px;}
    a:visited {  color: #0000FF; text-decoration: none}
    a:link {  color: #CCFFCC; text-decoration: none}
    a:hover {  color: #FF0000}
    .music { color: #191970 }
    -->
    </style>
    </HEAD>
    <body oncontextmenu=self.event.returnValue=false bgcolor="#88A0D7" topmargin="0" leftmargin="0" onload=mysel(form1.SELECT2)>
    <table height="100%" border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr><td width="1" bgcolor=black>
    </td><td>
    <table height="100%" border="0" width="100%" cellspacing="2" cellpadding="3">
    <tr><td height="2"> </td>
    <tr><td valign=top><form name=form1>
    <Div align=center>
    <SELECT name="SELECT2" onchange=mysel(this)>
    <OPTION value="0">==选择专辑==</OPTION>
    <OPTION value="1" selected>==音乐专辑1=</OPTION>
    <OPTION value="2">==音乐专辑2=</OPTION>
    <OPTION value="3">==音乐专辑3=</OPTION>
    </SELECT>
    <BR>
    <SELECT name="SELECT1" onchange="OnControl(this.value)">
    <OPTION value="0">==音乐控制==</OPTION>
    <OPTION value="100">停止播放音乐</OPTION>
    <OPTION value="101">设定播放次数</OPTION>
    <OPTION value="99">无限循环播放</OPTION>
    <OPTION value="0" style="BACKGROUND:darkblue; COLOR:white;">==播放列表==</OPTION>
    </SELECT>
    <BR>
    </DIV>
    [专辑 <font color=green><span id=disc>0</span></font> 共: <font color=#ff5555><span id=musiccount>0</span></font> 首歌曲]
    <HR color="#FFFF00" size="1">
    <INPUT type="radio" id=rd1 name=rd>送人
    <INPUT type="radio" id=rd2 name=rd checked>欣赏
    <HR color="#FFFF00" size="1">
    <div id=musiclist>
    </div>
    <HR color="#FFFF00" size="1">
                  <font size="5"><b><font color="#FF0000">如果合乎你的要求,就请加分吧,300?多多益善哦!</font></b></font> 
                </form>
    </td></tr></table></td></tr></table>
    </BODY>
    </HTML>
      

  3.   

    可以这样:
       先建立一个生成XML的服务器端程序,比如jsp,asp等等,任务是根据条件查询数据库,并得到一定的数据,将这些数据生成一个XML文件(当然自己组织最好),记住这个jsp或asp文件生成的不是普通的html文件,而是xml文件,这样客户端得到的将是xml文件;
       然后在选择音乐专辑事件中创建一个XMLDOM,使用XMLDOM.load(xxx.jsp?a=xx&b=xx...)函数可以实时的得到想要的XML格式数据,xxx.jsp就是上面做的生成XML程序,不要担心程序的正确性;-----xxx.jsp-------
    <?xml version="1.0" encoding="GB2312"?>
    <%
       String cname=request.getParamater("cname");
       String str="select * from cname='"+cname+"'";
       rs
       
       out.println("<xmlcustomer>");
       for (int i=1 ;i<rs.getRowCount();i++)
       {
          out.println("<customer>"
      out.print("<tel>"+rs.getColValue(i,"tel")+"</tel>");
      out.print("<quantity>"+rs.getColValue(i,"quantity")+"</quantity>");
          out.println("</customer>")   ;
       }
       out.println("</xmlcustomer>");
    %>
    ------music.html-------
        var xmldocp ;
    var docp = new ActiveXObject("Microsoft.XMLDOM");
    docp.async = false; function toGetInfo()
    {
        docp.load("/xxx.jsp?cname="+document.frmCustomer.t.value);
        xmldocp=docp.documentElement;
    document.frmCustomer.tel.value=xmldocp.childNodes[0].childNodes[0].text;
    document.frmCustomer.quantity.value=xmldocp.childNodes[0].childNodes[1].text;
    }