Jump to content
Fórum Script Brasil
  • 0

Imagens Aleatoria


Guest Welder
 Share

Question

4 answers to this question

Recommended Posts

  • 0
Guest Visitante

quase isso mais eu quero ainda n e assim.

e assim tipo aquele, mais quando uma imagem vai saindo a outra vai apreceçendo e assim vai...

Link to comment
Share on other sites

  • 0

Ontem tentei responder, mas não deu certo.

Eu criei um código que randomiza imagens aleatoriamente e dinâmicamente

<script>
function dynRandomImage(imgList){
imgList = imgList.substring(1, imgList.length-1)
imgList = imgList.split('][')
/*
Sintaxe: dynRandomImage([img1.ext][img2.ext][img3.ext][...])
*/
document.write('<img src="'+Math.floor(Math.random()*imgList.length)+'">')
}
dynRandomImage([foto1.jpg][foto2.jpg][foto3.jpg][...])
</script>

Testa e depois diz se é isso

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.8k
    • Total Posts
      646.7k
×
×
  • Create New...