Menu
Hi,
I have this code:
[code=php]<script type=”text/javascript”>
function playrandom(){
var a=Math.round(Math.random()*12-0.5);
var b=[“A1″,”AS1″,B1″,”C1″,”CS1″,D1″,”DS1″,”E1″,F1″,”FS1″,”G1″,GS1”]
document.getElementById(“thenote”).src=b[a]+”.mid”;
}
</script>
<bgsound id=”thenote”>
</head>
<body onload=”playrandom()”>
</body>
When you open the page, a random sound should play (either A1.mid, AS1.mid, B1.mid etc).
Thanks,
Neil