|
|
怎样用代码控制播放音乐暂停
原址: http://www.lslnet.com/linux/dosc1/54/linux-366278.htm
[html]
<EMBED id=bgs src="http://phx.cz0550.com/music/never-say-goodbye.wma" width=200 height=100 border=0 autostart=true loop=true></EMBED>
<button onclick=bgs.pause()>pause</button>
<button onclick=bgs.play()>play</button>
<EMBED id=bgs2 src="http://phx.cz0550.com/music/never-say-goodbye.mp3" width=200 height=100 border=0 autostart=true loop=true></EMBED>
<button onclick=bgs2.pause()>pause</button>
<button onclick=bgs2.play()>play</button>
[/html]
renaski在上个帖子中说
谢谢了!您的方法只是将其静音,不是暂停。不过可以有声道选择真是太棒了,我以前还不知道可以这样控制呢!
[html]
<EMBED id=aa src="http://phx.cz0550.com/music/never-say-goodbye.wma" width=300 height=100 border=0 autostart=true loop=true></EMBED><br /><br />
声道切换:
<input type=button value=左声道 >
<input type=button value=立体声 >
<input type=button value=右声道 ><br /><br />
音量调节:
<input type=button value=音量最小 >
<input type=button value=音量最大 >
<input type=button value=音量+100 >
<input type=button value=音量+100 >
<input type=button value=音量-100 >
<input type=button value=音量-100 ><br /><br />
静音控制:
<input type=button value=开启静音 >
<input type=button value=关闭静音 >
<input type=button value="静音切换[未开启静音]" name="dd" ><br /><br />
播放控制:
<input type=button value=停止 >
<input type=button value=暂停 >
<input type=button value=播放 >
[/html] |
不好意思,太粗心了。
[html]<EMBED id=bgs2 src="http://tsq.net.cn/muisc/rxq1/3.mp3" width=200 height=100 border=0 autostart=true loop=true>
<button onclick=bgs2.pause()>pause</button>
<button onclick=bgs2.play()>play</button>
[/html] |
|
|