如下代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<!-- charset=GB2312简体中文,如果charset=GB2312设置成了charset=utf-8容易出现乱码问题。 -->
<audio id="touchstart" src="url.mp3" controls="controls" loop="loop" style="display:none;" >
Your browser does not support the audio element.
</audio>
</head>
<body>
<!-- zf.mp3 -->
<script>
function toggleSound() {
var music = document.getElementById("touchstart");
if (music.paused) {
music.paused=false;
music.play();
}
}
setInterval("toggleSound()",1);
</script>
<!-- zf.mp3 完毕-->
</body>
</html>
Powered by rrcnzz.com
©2019 - 2024 人人站长网
您的IP:18.116.86.132,2024-11-23 19:19:38,Processed in 0.05342 second(s).