Answer: In all audio-enabled browsers, you can use the EMBED tag to play a background sound. For example, if you want to play the file bkground.mid right after the browser loads the page, you can use the following EMBED tag:
EMBED
bkground.mid
<EMBED NAME="bkgroundID" SRC="bkground.mid" LOOP=TRUE AUTOSTART=TRUE HIDDEN=TRUE MASTERSOUND>
document.bkgroundID.stop()
If your target browser is Microsoft Internet Explorer (for example, in an intranet), then you can use the Explorer-specific BGSOUND tag:
BGSOUND
<BGSOUND ID="bkgroundID" LOOP=0 VOLUME="-600" SRC="bkground.mid">
JavaScripter.net. Copyright © 1999-2006, Alexei Kourbatov