Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Alternate background sounds


< html >
< head >
< title > testing   </ title >
</ head >
< body >
< BGSOUND SRC = "aladdin.mid" ID = "changetrack" >
< SCRIPT >
<!--
setInterval( "switchMelody()" ,30000);

function switchMelody() {
  if (document.all.changetrack.src == "aladdin.mid" )
   document.all.changetrack.src = "xfiles.mid"
  else document.all.changetrack.src = "aladdin.mid" ;
}
//-->
</ SCRIPT >
</ BODY >
</ html >