Site hosted by Angelfire.com: Build your free website today!

 


Random Midi 2


1.Copy and paste under the <head> tag.

<Script Language="JavaScript">
function unixOrnot() {
if (navigator.appVersion.lastIndexOf('Unix') != 1)
return true
else
return false;
}
function randomNum() {
if (unixOrnot()) {
num = Math.random()
}
else {
num = Math.abs(Math.sin(Date.getTime()));
}
return num;
}
//-->
</SCRIPT>
 


1. Copy and paste under the <body> tag
    Change those wordings in red to the midis of
    your choice.

<Script Language="JavaScript">
var n;
var fileName = "1.mid";
randomNum();
n = num * 5;
if ( n > 1 ) fileName ="2.mid";
if ( n > 2 ) fileName ="3.mid";
if ( n > 3 ) fileName ="4.mid";
if ( n > 4 ) fileName ="5.mid";
document.write("<EMBED SRC="+fileName+" width='100' height='40' panel='1' repeat='true'>");
//-->
</SCRIPT>


Misc Menu      Javascript Sample Menu