제가 홈페이지에 배경음악을 랜덤으로 나오게 하기위해서 인터넷에서 이런걸 구했습니닷.


<script language="JavaScript">
<!--
song = new Array(2);
song[0] = 'http://wthoh.byus.net/embrace.wma'
song[1] = 'http://wthoh.byus.net/redsky.wma'


title = new Array(2);
title[0] = '유키 구라모토 - Second Romance'
title[1] = 'Kenny G - Songbird'


index = Math.floor(Math.random() * song.length);
document.write("<embed name=bgm src="+song[index]+" autostart=true hidden=true>");
document.write(title[index]);

onkeydown = function () {
if(event.keyCode == 27) { bgm.stop() }
}
//-->
</script>

하지만 여기서 하나 문제점은. 노래가 한곡 끝나면 다른 노래가 랜덤으로 나오지 않는다는것 =ㅂ=;;

여러분 부탁드려요!!! 저 스탑이 루프로 바뀌면 될까요 =ㅅ=;;?