embed能用js控制播放和暂停吗?
1个回答
2016-04-03
展开全部
<!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>
<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>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询