אם הכוונה שלך לטקסט מתחלף אז:
HTML קוד:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var howMany = 3
var quote = new Array(howMany+3)
quote[0]="1"
quote[1]="2"
quote[2]="3"
quote[3]="4"
function rndnumber(){
var randscript = -1
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1))
}
return randscript}
quo = rndnumber()
quox = quote[quo]
document.write(quox)
// End -->
</SCRIPT>
קוד שלא יוצגו פעמיים אין לי.