-1
我正在嘗試實現播放音頻的按鈕。我不想擁有滑塊。如何製作單擊播放音頻的圖像
無論如何擺脫滑塊,或者也許使用按鈕的圖像呢?
當前代碼:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Music</title>
<style type="text/css">
body {
color:transparent;
}
</style>
</head>
<body onLoad="RandomSong();">
<audio id="content" src="background1.mp3" controls></audio>
<script>
function RandomSong() {
var Music = ["background1.mp3","background2.mp3","background3.mp3","background4.mp3","background5.mp3"];
var randomCode = Math.floor(Math.random()*Music.length);
document.getElementById("content").value = "mp3=" + Music[randomCode] + "&showslider=0&width=5&loop=1&autoplay=0&volume=50";
}
</script>
</body>
</html>
你有什麼代碼,使遠嗎? –
我已經嘗試了很多東西,我甚至已經得到了圖像顯示。我只需要它在循環播放聲音 – DaFudgeWizzad
http://pastebin.com/2c4wSuqZ 我有音頻工作,無論如何,我可以用一個圖像替換播放器?更妙的是,無論如何,我可以隱藏滑塊,只有播放按鈕可見? – DaFudgeWizzad