标题:一个点击听歌程序的小小错误
只看楼主
lanya1983
Rank: 1
等 级:新手上路
帖 子:96
专家分:0
注 册:2006-3-11
 问题点数:0 回复次数:0 
一个点击听歌程序的小小错误

我定义了一个listenfun.asp

<script language="javascript">
function openlisten()
{window.open("listenning.asp?music_chinese=<%=music%>","newwindow","height=500,width=450");}

</script>

下面是一个调用页
<%Set connect=Server.CreateObject("ADODB.connection")
Set rs = CreateObject("ADODB.Recordset")
dim s
connect.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(".\lanyadb.MDB") & ";Persist Security Info=False"
s="Select * from music_info where music_new=1 order by music_date desc"
rs.open s,connect,1,1

Do

music=Trim(rs("music_chinese"))
picture="musicpic\" & Trim(rs("music_picture"))


%>
<!--#include file="listenfun.asp"-->
<tr>
<td onClick="openlisten()"><img border=0 src=<%=picture%> alt=<%=music%>>
<td><table width=100% border=0>

<tr><td onClick="javascript:window.open('listenning.asp?music_chinese=<%=music%>','','height=500,width=450')">
<a title="点击试听"> <font color="#3300FF"> <%=music%>&nbsp; <%=Trim(rs("music_english"))%></font></a>

<td align=right onClick="openlisten()">发行日期:<%=Trim(rs("music_date"))%>

<tr>
<td colspan=2 align=center> 作曲:<%=Trim(rs("music_writer"))%>&nbsp;&nbsp; 演唱:<%=Trim(rs("music_actor"))%>

<tr><td colspan=2><%=rs("music_brief")%>

<tr><td colspan=2 align=right>出品:<%=Trim(rs("music_producer"))%>

</table>

<%
rs.movenext
Loop until rs.Eof

rs.Close
Set rs=Nothing

%>

但是,每次听歌时打开数据库中最后一个内容 如何解决?

搜索更多相关主题的帖子: javascript language function False music 
2006-05-20 22:05



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-65875-1-1.html




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

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