1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

ASP关于音乐播放器问题。。。

本帖由 风狼2006-03-18 发布。版面名称:后端开发

  1. 风狼

    风狼 New Member

    注册:
    2005-10-01
    帖子:
    7,452
    赞:
    25
    我在首页用
    ------------------------------------------------------------------------------
    Set objRs=Server.CreateObject("Adodb.RecordSet")
    objRs.open strSql,objConn,1,1
    if objRs.eof and objRs.bof then
    Response.Write "<tr><td>数据库中没有记录!</td></tr>"
    else
    Do While not objRs.eof
    Response.Write "<tr><td>编号</td><td>歌曲名称</td></tr>"
    Response.Write "<tr><td>"&objRs("id")&"</td><td><a href='#' onclick='window.open('play.asp?id="&objRs("id")&"','Lcmusic','scrollbars=no,resizable=no,width=400,height=190,menubar=no,top=168,left=168')'>"&objRs("name")&"</a></td></tr>"
    objRs.MoveNext
    Loop
    end if
    ------------------------------------------------------------------------------
    得到音乐参数传递给play.asp文件播放。可点击后居然没有反应。。。是不是我这句有问题呀?
    ----------------------------------
    Response.Write "<tr><td>"&objRs("id")&"</td><td><a href='#' onclick='window.open('play.asp?id="&objRs("id")&"','Lcmusic','scrollbars=no,resizable=no,width=400,height=190,menubar=no,top=168,left=168')'>"&objRs("name")&"</a></td></tr>"

    ------------------------------------
    play文件
    ------------------------------------------------------------------
    <!--#include file="conn.asp"-->
    <%
    if Request.QueryString("id")<>"" then
    set objRs=server.createobject("adodb.recordset")
    id=Request.QueryString("id")
    sql="select * from Music where id="&id
    objRs.open sql,objConn,1,3
    if objRs.eof then
    errmsg="<li>对不起!该歌曲不存在,可能已经被管理员删除。</li>"
    call error()
    Response.End
    else
    objRs("hits")=objRs("hits")+1
    objRs.Update
    id=objRs("id")
    url=objRs("url")
    hits=objRs("hits")
    Mtype=objRs("type")
    Mname=objRs("name")
    end if
    objRs.Close

    else
    errmsg= "<li>请选择歌曲!</li>"
    call error()
    Response.End
    end if

    set objRs=nothing
    objConn.close
    set objConn=nothing
    %>

    <head>
    <title>※<%=Mname%>※☆☆☆交谊舞曲在线☆☆☆</title>
    <style type="text/css">

    <!--

    td { font-size: 9pt; color: #000000}

    a:link { font-size: 9pt; color:#000000; text-decoration: none}

    a:active { font-size: 9pt; ; text-decoration: underline}

    a:visited { font-size: 9pt; color: #000000; text-decoration: none}

    a:hover { font-size: 9pt; color:#000000; text-decoration: underline; background-color: #00FFFF}

    -->

    </style>
    </head>

    <BODY bgColor=#CCCCCC leftMargin=0 topMargin=0 oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
    <SCRIPT>
    //
    function rf()
    {return false; }
    document.oncontextmenu = rf
    function keydown()
    {if(event.ctrlKey ==true || event.keyCode ==93 || event.shiftKey ==true){return false;} }
    document.onkeydown =keydown
    function drag()
    {return false;}
    document.ondragstart=drag
    function stopmouse(e) {
    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
    return false; }
    document.onmousedown=stopmouse;
    if (document.layers)
    window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown=stopmouse;

    </SCRIPT>

    <TABLE align="center" cellpadding="0" cellspacing="0" width=400 border=0>
    <TBODY>
    <TR>
    <TD><IMG height=39 src="bofang/top.gif"
    width=400 border=0></TD>
    </TR>
    <TR>
    <TD background="bofang/bg1.gif">
    <TABLE cellSpacing=0 cellPadding=3 width="96%" align=center border=0>
    <TBODY>
    <TR>
    <TD width="28%">
    <TABLE cellSpacing=0 cellPadding=3 width="90%" align=center
    border=0>
    <TBODY>
    <TR>
    <TD><a target="_blank" href="http://www.midiav.com"><img height=14
    src="bofang/wzzy.gif"
    width=73 border=0></a></TD>
    </TR>
    <TR>
    <TD><a href="http://mp3.baidu.com/m?tn=baidump3lyric&ct=150994944&rn=10&word=<%=Mname%>"target=_blank"><img height=14
    src="bofang/ckgc.gif"
    width=73 border=0></a></TD>
    </TR>
    <TR>
    <TD><a href="http://mp3.baidu.com/m?tn=baidump3&ct=134217728&rn=&word=<%=Mname%>"target=_blank"><img height=14
    src="bofang/gqxz.gif"
    width=73 border=0></a></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    <TD width="72%">
    <TABLE cellSpacing=0 cellPadding=0 width=273 border=0>
    <TBODY>
    <TR>
    <TD><IMG height=10
    src="bofang/w_top.gif"
    width=273></TD>
    </TR>
    <TR>
    <TD
    background="bofang/w_bg.gif">
    <TABLE cellSpacing=0 cellPadding=0 width="94%" align=center
    border=0>
    <TBODY>
    <TR>
    <TD height=24><div align="center">歌名:<%=Mname%> 所属类别:<%=Mtype%></div></TD>
    </TR>
    <TR>
    <TD height=17><input align="center" name="textfield" type="text" style="background-color: #FFFFFF; color: #777777; border: 1 solid #EAEBEB" value="请把本站网址发给QQ上的好友,谢谢支持!" size="35">
    </TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    <TR>
    <TD><IMG height=6
    src="bofang/w_foot.gif"
    width=273></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
    <TR>
    <TD align=right><IMG height=71
    src="bofang/p_lift.gif"
    width=5></TD>
    <TD width=375>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
    <TR>
    <TD
    background="bofang/p_top.gif"
    height=5><IMG height=5
    src="bofang/p_top.gif"
    width=2></TD></TR>
    <tr>
    <td align=center>
    <OBJECT ID="mPlayer1" width=375 height=62 CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" align="left">
    <param name="URL" value="wma.asp?id=<%=id%>">
    <param name="rate" value="1">
    <param name="balance" value="0">
    <param name="currentPosition" value="0">
    <param name="defaultFrame" value>
    <param name="playCount" value="99">
    <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="0">
    <param name="windowlessVideo" value="0">
    <param name="enabled" value="-1">
    <param name="enableContextMenu" value="-1">
    <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="_cx" value="8202">
    <param name="_cy" value="1693">
    </OBJECT>
    </td>
    </TR>
    <TR>
    <TD
    background="bofang/p_foot.gif"
    height=4><IMG height=4
    src="bofang/p_foot.gif"
    width=1></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    <TD><IMG height=71
    src="bofang/p_right.gif"
    width=5></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    <TR>
    <TD><IMG height=14
    src="bofang/foot.gif"
    width=400></TD>
    </TR>
    </TBODY>
    </TABLE>
    </body>
    ---------------------------------
     
  2. Ulysses

    Ulysses New Member

    注册:
    2006-02-05
    帖子:
    10,018
    赞:
    16
    Set objRs=Server.CreateObject("Adodb.RecordSet")
    objRs.open strSql,objConn,1,1

    srtSql 的内容,好像没看到。
     
  3. 风狼

    风狼 New Member

    注册:
    2005-10-01
    帖子:
    7,452
    赞:
    25
    Response.Write "<tr><td>"&objRs("id")&"</td><td><a href='#' onclick='window.open('play.asp?id="&objRs("id")&"','Lcmusic','scrollbars=no,resizable=no,width=400,height=190,menubar=no,top=168,left=168')'>"&objRs("name")&"</a></td></tr>"

    就是这里的问题。。“”的事。。唉。。。昨天解决了。。CH星期六没人