ציטוט:
נכתב במקור על ידי MasterT
PHP קוד:
<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>
למרות שיכול להיות שאפשר ישירות לעשות innerHTML למרקויי.
|
מה שנתת בכלל לא משתנה. טקסט קבוע.
וגם לא הצלחתי לטעון אותו ישר, שמתי אפילו את ה SETINTERVAL כפונקציה וקראתי לזה ול RAND ולא פעל :\