陈百强偏偏喜欢你谐音:在asp中点击一个image类型的按钮,让背景音乐就是指定的音乐,应该怎么实现?

来源:百度文库 编辑:中科新闻网 时间:2024/04/27 04:11:07
用了你的代码,但是听不到声音啊!
是不是在VALUE中写歌的名字就可以了呢?
呵呵,听不到声音啊!
可以在帮帮我吗?详细一点啊!

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>背景音乐</title>
<%
if Request("m")<>"" then
music=Trim(Request("m"))
else
music=1
end if
%>
<bgsound src="<%= music %>.mid" loop="-1">
</head>

<body>
<input type="button" value="音乐1" onClick="location.href='test.asp?m=1'">
<input type="button" value="音乐2" onClick="location.href='test.asp?m=2'">

</body>
</html>

保存为test.asp,找两个mid文件放同一目录下,运行