标题:
用JAVASCRIPT 控制网页背景音乐
[打印本页]
作者:
fangzhen
时间:
2009-7-22 09:40
标题:
用JAVASCRIPT 控制网页背景音乐
<bgsound id=bgs src="/song1.mid" loop="-1">
<INPUT type=file >
<input type=button value="stop" >
<script language=javascript>
var ss; //设定一个全局变量
function cc(tt)
{
if (document.all.bgs.src != "")
{
ss = document.all.bgs.src;
document.all.bgs.src = ""; //stop
tt.value = "begin";
}
else
{
document.all.bgs.src = ss;
tt.value = "stop";
}
}
</script>
欢迎光临 PHP开发笔记 (http://phpvi.com/)
Powered by Discuz! 6.1.0