Trying to add a sound to a button, can´t figure out what´s wrong. Is there any other ways to do it?
HTML
<audio id="myAudio">
<source href="url"="http://lab.wijkmanska.se/webbteknik/te13/mattias_martinsson/V08/KnappMattias (1).wav" type="audio/wav">
</audio>
<button type="button" onclick="aud_play_pause()">Play/Pause</button>
JavaScript
function aud_play_pause() {
var myAudio = document.getElementById("myAudio");
if (myAudio.paused) {
myAudio.play();
} else {
myAudio.pause();
}
}