Web Coders Forum

User info

Welcome, Guest! Please login or register.


You are here » Web Coders Forum » JavaScript » JS random display script


JS random display script

Posts 1 to 6 of 6

1

This Free Script is also used here on WCF to display quotes notices and promoted topics.

Here is the script that helps you to display random content.

Code:
<script language="JavaScript">
<!--
aandj = new Array('Value A','Value B'); 
n=Math.floor(Math.random() * 5);
document.write(aandj[n]);
//-->
</script>


[text] <script language="JavaScript">
<!--
aandj = new Array('Value A','Value B');
n=Math.floor(Math.random() * 5);
document.write(aandj[n]);
//-->
</script>[/text]

Where you see value a or value b you can.put text image div any thing
to increase the items you want to display randomly simply complete  the cycle ie 'value a','value b','value c' 
try it if you have any problem tell me

0

2

Random JS

seen this b4

0

3

Yh i posted it on NCT

0

4

@Jonath45 I find this script useful

0

5

I knew about this Random JS and have been using it. Thanks for the share!

0

6

@abbey you are welcomed

0


You are here » Web Coders Forum » JavaScript » JS random display script