ForumCommunity

Wiki - Randomly variable HTML

    Here is a script to generate images at random:
    HTML
    <script type="text/javascript"><!--
    var ran=new Array();

    ran[0]='<img src="image_address">';
    ran[1]='<img src="image_address">';
    ran[2]='<img src="image_address">';

    var id=Math.round(Math.random()*(ran.length-1)); document.write(ran[id]);
    //-->
    </script>


    To increas the number of random images, you must add
    HTML
    ran[3]='<img src="image_address">';

    For each new line you must increase the figure of 1:
    HTML
    ran[cifra]


    It is possible to show some textual links, simple writings or more, by replacing the code of the images (see HTML Guide), always remembering to put a \ before any before any summit '.
    Example of textual link:
    HTML
    ran[0]='<a href="http://www.forumfree.net" target="_blank">ForumFree.net</a>';

    This script can be used only in Manage HTML code.