Javascript Main Musik

<!DOCTYPE html>
<html>

<script>
function play_pause() {
var myAudio = document.getElementById(“myAudio”);

if (myAudio.pause) {
myAudio.play();
} else {
myAudio.pause();
}
}
</script>

<body>

<button type=”button” onclick=”play_pause()”>Play/Pause</button>

<audio id=”myAudio” preload loop>
<source src=”horse.mp3″ type=”audio/mpeg”>
Your browser does not support this audio format.
</audio>

</body>

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: