I wan to create a webpage with a background sound. And will have a stop & play button for it.
[CODE]<head >
<script type=”text/javascript”>
function stop() {
document.getElementById(“sound”).src = “”;
}
</script>
</head>
<body >
<EMBED SRC=”robot2.mp3″ height=”30″ AUTOSTART=”true” hidden=”true” id=”sound” loop=”true”
>
<input type=”button” onclick=”stop();” value=”Stop music” />
<input type=”button” onclick=”location.reload(true);” value=”Start music” />
</body>
I get some code from forum. It work well on ff, but when come to IE the stop button failed to work.
Could somebody help to edit it so that it can work on both browser…thanks~~