asp播放音樂代碼

來源:互聯網
上載者:User

asp播放音樂代碼,這個代碼是從資料庫中讀取音樂的地址然後給播放器.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
check()
dim id,sql
id=html_encode(request.QueryString("id"))
if not isnumeric(id) or id="" then
response.Write("<script language='javascript'>alert('非法操作了,這樣不能戰歌.');history.back();</script> ")
else
sql="select title,id,say,zp_path from music where id="&id
updatesql="update music set hit=hit+1 where id="&id
call opendb()
set rs=cn.execute(sql)
if not rs.eof then
cn.execute(updatesql)
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("title")%></title>
<style type="text/css">
<!--
body {
 margin-left: 2px;
 margin-top: 2px;
 margin-right: 2px;
 margin-bottom: 2px;
}
-->
</style></head>

<body>

<table width="98" border="0" align="center" cellspacing="1" bgcolor="#0099cc">
  <tr>
    <td height="28" background="img/play.gif"><table width="100%" height="28"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="33%" align="left">&nbsp;</td>
        <td width="60%">&nbsp;</td>
        <td width="7%" align="center"><table width="22" height="21" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td onMouseOver="this.style.backgrond='img/down.gif';" onMouseOut="this.style.background='img/playclose.gif';"><a href="javascript:window.close();"><img src="img/playclose.gif" width="21" height="22" border="0"></a></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="300" align="center" valign="top" bgcolor="#FFFFFF"><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <form name="form1" method="post" action=""> <td align="center">
        
            <textarea name="textarea" cols="60" rows="17" style="background:url(photo/2006111447439849.JPG)"><%=encode_html(rs("say"))%></textarea>
          </td>
        </form>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><object classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" width=450 height=45 align="middle" id="mPlayer1">
      <param name="invokeURLs" value="0">
      <!--指令碼命令設定:是否調用URL-->
      <param name="URL" value="<%=encode_html(rs("zp_path"))%>">
      <param name="rate" value="1">
      <param name="balance" value="0">
      <param name="currentPosition" value="0">
      <param name="defaultFrame" value>
      <param name="playCount" value="100">
      <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="7779">
      <param name="_cy" value="1693">
    </object></td>
  </tr>
</table>
<%
else
response.Write("<script language='javascript'>alert('對不起,這首歌可能己被刪除!');history.back();</script> ")
end if
end if%>
</body>
</html>

註明:轉載請說明出處www.111cn.net

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.