1. Do an IFRAME, iframe src: music.htm
If you don't know how to make i frames, read this: Iframes Basics
2. Make new htm doc.
Write in it this code in <head>:
| <bgsound id="PlayMusic">
<script type="text/javascript"> <!-- PlayMusic.src="music.mp3"; function OnOff() { if (PlayMusic.src=="") { PlayMusic.src="music.mp3"; OnOffButton.value="Stop"; } else { PlayMusic.src=""; OnOffButton.value="Play"; } } // --> </script> |
replace the file name in "music.mp3". its not must be mp3, its can be MID or WAV, but the
best is MP3 or MID.
now, in the <body> but this:
| <input type="button" name="OnOffButton" value="Stop" onClick="OnOff()"> |
and save it as "music.html
the html shod look loke this:
| <html>
<head> <bgsound id="PlayMusic"> <script type="text/javascript"> <!-- PlayMusic.src="music.mp3"; function OnOff() { if (PlayMusic.src=="") { PlayMusic.src="music.mp3"; OnOffButton.value="Stop"; } else { PlayMusic.src=""; OnOffButton.value="Play"; } } // --> </script> </head> <body bgcolor="#000000" scrollamount="0"> <input type="button" name="OnOffButton" value="Stop" onClick="OnOff()"> </body> </html> |
Now, u have a web site background music without flash!!!



