hey, sorry if this has been answered- but i'm looking for a code that would basically generate a random code that changed when you refreshed/changed pages~ er, basically like what they have on the
Fictionalley forums xD; i was wondering if anyone either knew the code or where to get it, if it exists?
thanks!
I have a changing quote code on my forum. I can give you that.
| CODE |
<SCRIPT language=Javascript> function text() { };
text = new text(); number = 0;
// textArray text[number++] = "Your quote could be here."
// keep adding items here...
increment = Math.floor(Math.random() * number);
document.write(text[increment]);
//--></SCRIPT>
|
You just keep adding text[number++] = "Your quote could be here." one beneath the other, not need for BR tags. You have to have the quotes there, so if you're going to have speak in the quote, us ' instead of " otherwise it might cause coding issues.
that works, thank you so much <3