网页 怎么做 点击文字播放wav格式的音乐
发布网友
发布时间:2022-05-25 16:33
我来回答
共3个回答
热心网友
时间:2023-11-18 19:35
<bgsound loop=false autostart=false id="bgss">
<script language="javascript">
function Select(url)
{
try{
document.all.bgss.src=url;
bgss.play();
}
catch(e){
}
}
</script>
<span onclick="Select('sound/1.wav')" style="cursor:pointer"><input type="radio" name="sound" value="1">1</span>
<span onclick="Select('sound/2.wav')" style="cursor:pointer"><input type="radio" name="sound" value="2">2</span>
<span onclick="Select('sound/3.wav')" style="cursor:pointer"><input type="radio" name="sound" value="3">3</span>
<span onclick="Select('sound/4.wav')" style="cursor:pointer"><input type="radio" name="sound" value="4">4</span>
热心网友
时间:2023-11-18 19:35
这个是必然的,marquee有一块固定的区域,不会整个页面飘。要实现你说的效果,必须使用定时器,每次触发,就把广告移动一下位置。
热心网友
时间:2023-11-18 19:36
<bgsound
loop=false
autostart=false
id="bgss">
<script
language="javascript">
function
Select(url)
{
try{
document.all.bgss.src=url;
bgss.play();
}
catch(e){
}
}
</script>
<span
onclick="Select('sound/1.wav')"
style="cursor:pointer"><input
type="radio"
name="sound"
value="1">1</span>
<span
onclick="Select('sound/2.wav')"
style="cursor:pointer"><input
type="radio"
name="sound"
value="2">2</span>
<span
onclick="Select('sound/3.wav')"
style="cursor:pointer"><input
type="radio"
name="sound"
value="3">3</span>
<span
onclick="Select('sound/4.wav')"
style="cursor:pointer"><input
type="radio"
name="sound"
value="4">4</span>