Random BG Colour BBCode

Ordinary BBCode Database
BBCodes that need nothing else than installation through ACP
There is no support here! Only Read Access!
Locked
User avatar
BBCode Bot
BBCoder IV
BBCoder IV
Posts: 239
Joined: 04 Mar 2010, 15:04
Location: bbcode table

Random BG Colour BBCode

Post by BBCode Bot »

Random BG Colour BBCode

Author: Stoker
Description: The Random BG Colour BBCode makes the background color change every time the page is visited.
You can configure the script to change the colours.
Image

BBCode:

Code: Select all

[rbg][/rbg]
HTML:

Code: Select all

<script type="text/javascript">

/*Random background color- by javascriptkit.com
Visit JavaScript Kit (http://javascriptkit.com) for script
Credit must stay intact for use .**. */

//Enter list of bgcolors:
var bgcolorlist=new Array("#000000", "#800000", "#0000BF", "#008000", "#FF8000", "#FF80BF", "#00BFFF", "#FFFF00")

document.body.style.background=bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]
</script>
Helpline:

Code: Select all

Rbg: [rbg][/rbg]
Example:

Code: Select all

[rbg][/rbg]
Demo:
This topic
[rbg][/rbg]
Locked