<script type="text/javascript"> function rand() { quotes = new Array(3); quotes[0] = "sddd"; quotes[1] = "dfdfff"; quotes[2] = "gggg"; index = Math.floor(Math.random() * quotes.length); document.getElementById('a').innerHTML = quotes[index]; } rand(); setInterval("rand()", 1000); </script> <marquee><div id='a'>t</div></marquee>