我的代码:<script type="text/javascript" src="jquery-1.9.1.js"></script><script>$(function(){$('#b5').click(function(){alert('ok');$("#player").Stop();})$('#b6').click(function(){alert('暂停');$("#player").onpause();})})</script></head><body><EMBED id="player" src="m1.mp3" hidden=no style="scrollbar-3dlight-color:#000"> </EMBED><input type="button" value="播放" id="b5"/><input type="button" value="暂停" id="b6"/></body></html>不管用?
1 回答
白衣染霜花
TA贡献1796条经验 获得超10个赞
<!DOCTYPE HTML> < html > < head > < meta charset = "UTF-8" /> < title >last.html</ title > < style > </ style > < script type = "text/javascript" src = "jquery-1.8.0.min.js" ></ script > < script type = "text/javascript" > $ (function () { var player = $ ("#player")[0]; $ ('#b5').click (function () { player.Play (); }) $ ('#b6').click (function () { player.Pause (); }) $ ('#b7').click (function () { player.Stop (); }) }) </ script > </ head > < body > < EMBED id = "player" src = "Music/MusicList/xxdd.mp3" autoplay = "false" hidden = no style = "scrollbar-3dlight-color: #000" > </ EMBED > < input type = "button" value = "播放" id = "b5" /> < input type = "button" value = "暂停" id = "b6" /> < input type = "button" value = "停止" id = "b7" /> </ body > </ html > |
添加回答
举报
0/150
提交
取消