Search Results for 'Interval'


1 POSTS

  1. 2008.06.10 random,setInterval

random,setInterval

Posted 2008. 6. 10. 15:42 by maxmini MAXMINI

<script type="text/javascript">
var myTest = new Array('AAA','BBB','CCC','DDD','EEE');
document.write(randomItem(myTest),'<br/>');
document.write(randomItem(myTest),'<br/>');
document.write(randomItem(myTest),'<br/>');

function randomItem(){
    return myTest[Math.floor(Math.random()*myTest.length)];
//    document.all.a.innerText = myTest[Math.floor(Math.random()*myTest.length)];
}
window.setInterval("randomItem() ",1000);
</script>

Tag : , ,

Write your message and submit