I have made a homepage with random background music but sometimes I want to turn the background music off cause I am listening to something else,
I know that I can just hit the stop button which is next to the "Refresh" button but I have made my own picture which I would like to use as a "on/off" button.
This is the random background script I have:
Now I just want to have a ON/OFF button but I would like to use my own picture as button.Code:<script>
<!--
//By JavaScript Kit (http://www.javascriptkit.com) More JavaScripts here!
var sound1="sound/onestepcloser.mid"
var sound2="sound/again.mid"
var sound3="sound/waitand.mid"
var sound4="sound/changes.mid"
var sound5="sound/crawling.mid"
var x=Math.round(Math.random()*4)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else x=sound5
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</script>