| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1048 人关注过本帖
标题:[求助]这个音乐点播的页面出了什么问题?
只看楼主 加入收藏
goodniao
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-7-27
收藏
 问题点数:0 回复次数:1 
[求助]这个音乐点播的页面出了什么问题?

音乐播放器调不出来,弹出的页面也没有播放
文件源码太长,重新上传了一下html文件

<html>
<head>
<title>点歌系统</title>
<meta http-equiv='content-type' content='text/html; charset=gb2312'>
<script>
var winbgcolor = parent.cbg();
var winbgimage = parent.cbi();
document.writeln("<body bgcolor=" + winbgcolor + " background=" + winbgimage + " bgproperties=fixed topmargin=3>");
var zj = "<%=zj%>";
function gozj(){
url="song.asp?zj=" + document.songlist.songzj.options[document.songlist.songzj.selectedIndex].value;
this.location.href=url;
}
function wz(v){
if(v == zj){
document.write("<option value=\"" + v + "\" Selected>" + v + "</option>");
}
else{
document.write("<option value=\"" + v + "\">" + v + "</option>");
}
}
function check(){
if(document.songlist.song.selectedIndex == -1){
alert("请选择曲目。");
return false;
}
}
function ws(v){
var newv = escape(v);
var fv = v.substring(0, v.lastIndexOf("."));
if(newv == v || v.indexOf("'") != -1){
if(fv.length > 11){fv = fv.substring(0,11) + "…"}
document.write("<option value=\"" + v + "\">" + fv + "</option>");
}
else{
if(fv.length > 5){fv = fv.substring(0,5) + "…"}
document.write("<option value=\"" + v + "\">" + fv + "</option>");
}
}
function s(){
if(document.songlist.song.selectedIndex == -1){
alert("请选择曲目。");
return false;
}
v = document.songlist.song.options[document.songlist.song.selectedIndex].value;
v = v.substring(0, v.lastIndexOf("."));
while(v.indexOf("_") != -1){v = v.replace("_"," ")}
alert("完整曲名:[ " + v + " ]");
}
function playsong(){
if(document.songlist.song.selectedIndex == -1){
alert("请选择曲目。");
return false;
}
zj = document.songlist.songzj.options[document.songlist.songzj.selectedIndex].value;
sn = document.songlist.song.options[document.songlist.song.selectedIndex].value;
if(document.songlist.loopok[1].checked){
cs = "infinite";
csn = "百听不厌";
}
else{
cs = "1";
csn = "只听一遍";
}
url = parent.ph + "mid/" + escape(zj) + "/" + escape(sn);
ext = sn.substring(sn.lastIndexOf(".") + 1, sn.length);
if(ext == "rm" || ext == "ram" || ext == "wma"){
var myn = '<%=dv_user(0)%>';
if(ext == "wma"){
player = "媒体播放机";
}
else{
player = "RealPlayer";
}

parent.getmsg(myn,myn,0,"<font color=black>【点歌】</font>正在调用 <font color=red>"+player+"</font> 播放曲目<font color=A00000>《" + sn.substring(0, sn.lastIndexOf(".")) + "》</font>,如果您没有安装 <font color=red>"+player+"</font> 将不能播放。",'2','000000','0088FF','0','<%=time()%>');
// parent.song.location.href = url;
var songplaywindow = window.open('about:blank', '', 'width=340,height=100');
songplaywindow.document.open();
songplaywindow.document.writeln("<html><title>播放器</title><style type=text/css>body{font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>");
songplaywindow.document.writeln("<embed src=\"" + url + "\" width=100% height=100% nojava='true' autostart='True'></embed>");
songplaywindow.document.writeln("<div id='Layer1' style='position:absolute; left:-800px; top:-800px; width:0px; height:0px; z-index:1'><input type=button name=btc value='关闭(Q)' accesskey='q' onClick='top.window.close();'></div>");
songplaywindow.document.writeln("</body></html>");
songplaywindow.document.close();

}
else{
parent.f8.document.open();
parent.f8.document.writeln("<bgsound src=\"" + url + "\" loop=" + cs + ">");
parent.f8.document.close();
var myn = '<%=dv_user(0)%>';
parent.getmsg(myn,myn,0,"<font color=black>【点歌】</font>正在下载并播放曲目<font color=A00000>《" + sn.substring(0, sn.lastIndexOf(".")) + "》</font>,播放方式:<font color=A00000>" + csn + "</font>,请稍候……",'2','000000','0088FF','0','<%=time()%>');
}
}
function stopsong(){
parent.f8.location.href = "about:blank";
}
</script>
<style type="text/css">
A:visited{TEXT-DECORATION: none;Color:#000000}
A:active{TEXT-DECORATION: none;Color:#000000}
A:hover{TEXT-DECORATION: underline;Color:#000000}
A:link{text-decoration: none;Color:#000000}
.t{LINE-HEIGHT: 1.4}
BODY{FONT-FAMILY: "宋体"; FONT-SIZE: 12px;
}
TD,p,div,br{FONT-FAMILY: "宋体"; FONT-SIZE: 12px;Color:#000000;}
FORM{FONT-FAMILY: "宋体"; FONT-SIZE: 12px}
OPTION{FONT-FAMILY: "宋体"; FONT-SIZE: 12px}
INPUT{BORDER-TOP-WIDTH: 1px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 1px; BORDER-BOTTOM-COLOR: #cccccc; PADDING-BOTTOM: 1px; BORDER-TOP-COLOR: #cccccc; PADDING-TOP: 1px; HEIGHT: 18px; BORDER-RIGHT-WIDTH: 1px; BORDER-RIGHT-COLOR: #cccccc; font-family: "宋体"; font-size: 12px}
textarea {border-width: 1; border-color: #000000; background-color: #efefef; font-family: "宋体"; font-size: 12px; font-style: bold;}
select {border-width: 1; border-color: #000000; background-color: #eeeeee; font-family: "宋体"; font-size: 12px; font-style: bold;}
</style>
</head>
<script>
var winbgcolor = parent.cbg();
var winbgimage = parent.cbi();
document.writeln("<body bgcolor=" + winbgcolor + " background=" + winbgimage + " bgproperties=fixed topmargin=3>");
</script>
<div align=center><font color="#FFFF00" style="font-size:12pt">点歌系统</font></div>
<hr size=1 color=FFFF00>
<table border="0" width="100%">
<form method="post" action="hqtchat420.asp" name="songlist" onSubmit="return(check())">
<tr>
<td>
<div>
<p><a href="javascript:history.go(0)" title="显示最新的曲目列表"><font color="#FFFFFF">刷新:<%=sj%></font></a></p>
<p><font color="#FFFF00">选择专辑:</font><br>
<select name="songzj" onChange="javascript:gozj()">
<%
Set fs=CreateObject("Scripting.FileSystemObject")
zjpath=Server.Mappath("mid")
Set f=fs.GetFolder(zjpath)
Set fc=f.SubFolders
sss=0
For Each f1 in fc
fn=f1.name
if zj="" and sss=0 then zj=fn
sss=sss+1
Response.Write "<script>wz(" & chr(34) & fn & chr(34) & ");</script>" & chr(13) & chr(10)
next
%>
</select>
</p>
</div>
<p>
<font color="#FFFF00">选择曲目:</font><br>
<select name="song" size="9">
<option>------------</option>
<%
songpath=Server.Mappath("mid/"&zj)
Set f=fs.GetFolder(songpath)
Set fc=f.Files
For Each f1 in fc
fn=f1.name
Response.Write "<script>ws(" & chr(34) & fn & chr(34) & ");</script>" & chr(13) & chr(10)
next
Set f=nothing
Set fc=nothing
Set fs=nothing
%>
</select>
</p>
<p><font color="#FFFF00">播放方式:</font><br>
<input type="radio" name="loopok" value="1" checked>
只听一遍<br>
<input type="radio" name="loopok" value="infinite">
百听不厌</p>
<table border="0" cellpadding="4">
<tr>
<td>
<input type="button" name="play" value="播放" onClick="javascript:playsong()">
</td>
<td align="right">
<input type="button" name="st" value="停止" onClick="javascript:stopsong()">
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" value="完整的曲名" onClick="Javascript:s()" name="san">
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</body>
</html>

BT7Ez7xg.rar (2.87 KB) [求助]这个音乐点播的页面出了什么问题?


[此贴子已经被作者于2007-7-28 0:27:57编辑过]

搜索更多相关主题的帖子: 音乐 var 页面 点播 
2007-07-28 00:25
快速回复:[求助]这个音乐点播的页面出了什么问题?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017630 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved