Posted By

supermauerbros on 02/23/10


Tagged

javascript random load


Versions (?)

Random HTML content on load


 / Published in: JavaScript
 

  1. <SCRIPT LANGUAGE="Javascript">
  2. function banner() { } ; b = new banner() ; n = 0
  3. b[n++]= "<IMG name=randimg SRC='images/video_stills/01.jpg' border='0' ALT=''>"
  4. b[n++]= "<IMG name=randimg SRC='images/video_stills/14.jpg' border='0' ALT=''>"
  5. b[n++]= "<IMG name=randimg SRC='images/video_stills/04.jpg' border='0' ALT=''>"
  6. b[n++]= "<IMG name=randimg SRC='images/video_stills/02.jpg' border='0' ALT=''>"
  7. b[n++]= "<IMG name=randimg SRC='images/video_stills/10.jpg' border='0' ALT=''>"
  8. b[n++]= "<IMG name=randimg SRC='images/video_stills/05.jpg' border='0' ALT=''>"
  9. i=Math.floor(Math.random() * n) ;
  10. document.write( b[i] )
  11. </SCRIPT>

Report this snippet  

You need to login to post a comment.