Javascript html5中暂停和播放按钮的使用 html
我正在开发一个使用HTML5、CSS和JS的场景,如上图所示,我想在其中使用播放、暂停和回放按钮 如果有办法,请建议我。Javascript html5中暂停和播放按钮的使用 html,javascript,css,html,Javascript,Css,Html,我正在开发一个使用HTML5、CSS和JS的场景,如上图所示,我想在其中使用播放、暂停和回放按钮 如果有办法,请建议我。/*脚本*/ <body onload="animatepaapa();"> <audio id="audioTag1" src="paara.wav" preload="auto"> <code>audio</code> $(文档).ready(函数(){ $(“#停止”)。单击(函数(){ $(“#a”).stop(真、假)
/*脚本*/
<body onload="animatepaapa();">
<audio id="audioTag1" src="paara.wav" preload="auto">
<code>audio</code>
$(文档).ready(函数(){
$(“#停止”)。单击(函数(){
$(“#a”).stop(真、假);
$(“#t”).stop(真、假);
});
$(“#开始”)。单击(函数(){
吃动画();
});
});
/*html*/
它为我工作,满足了我的要求。
多谢各位 开发场景?你能详细说明一下你到底想做什么吗?到目前为止,一些代码对你的工作很有帮助。我用unicodes来记一个单词,通过使用这个单词的字母,我试图通过将它们向下移动并与其他字母配对来发展其他单词。整个音频场景的形成就是一个场景。我强烈建议你自己做一些研究来开始(谷歌是一个强大的搜索引擎),并帮助我们帮助你。向我们展示您的尝试,一些代码示例,我们将从中帮助您。@Danbopes我已经完成搜索,但无法找到满足我要求的解决方案。
function animateat() {
document.getElementById('audioTag1').play();
document.getElementById('audioTag1').play();
$("#a").animate(
{ "top": "300px", "color": "white" },
2000, function () {
$("#t").animate({ "top": "300px", "color": "white"
},
2000,function () {
$("#t").animate(
{ "left": "760px" },1000);
}
);
}
<body onload="animatepaapa();">
<audio id="audioTag1" src="paara.wav" preload="auto">
<code>audio</code>
/*script*/
$(document).ready(function() {
$("#stop").click(function() {
$("#a").stop(true,false);
$("#t").stop(true,false);
});
$("#start").click(function() {
animateat();
});
});
/*html*/
<input type="button" id="start" value="start"/>
<input type="button" id="stop" value="stop"/>