Guest Necromancer Posted April 25, 2003 Report Share Posted April 25, 2003 Olá gostaria de saber qual é o script q eu tenho q usar para q cada vez q um pessoa entra na minha hp ela ouça uma musica diferete??? Quote Link to comment Share on other sites More sharing options...
0 Neemias Posted April 25, 2003 Report Share Posted April 25, 2003 Você vai ter que fazer a seguinte funçãomusica=random(10);function escolhe_musica(){if musica=1 document.write('<bgsound=musica1.mid');if musica=2 document.write('<bgsound=musica2.mid');....}No body da tua página: <body OnLoad=escolhe_musica()>Random sorteia um número, dentro da função eu faço um teste, para cada número sorteado eu tenho uma música diferente.OBS: PODE TER ERROS NAS SINTAXES DO MEU JAVA, MAIS A LÓGICA ESTÁ CORRETA. ALGUÉM POR FAVOR CONSERTE MEU JAVA SE ELE ESTIVER INCOREETO. Quote Link to comment Share on other sites More sharing options...
Question
Guest Necromancer
Olá gostaria de saber qual é o script q eu tenho q usar para q cada vez q um pessoa entra na minha hp ela ouça uma musica diferete???
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.