Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
change of color every time a page is reloaded
Old 06-22-2005, 06:04 AM change of color every time a page is reloaded
Junior Talker

Posts: 1
Trades: 0
Hi everyone!

I am trying to make a web page change color so that it looks different every time it is loaded, either randomly or depending on a date. I am trying to locate DHTML/JavaScript that would make this possible. I've tried searching the Net for a script like that but can't find one.

Any help would be much appreciated.
taras is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-24-2009, 09:41 AM Re: change of color every time a page is reloaded
Extreme Talker

Posts: 246
Trades: 0
Something like this should do.

<script>
function changeBackGround()
{
var arr = new Array ();
arr[0] = "red";
arr[1] = "blue";
arr[2] = "green";
arr[3] = "#ffffff";
arr[4] = "#000000";
arr[5] = "#ff00ff";
arr[6] = "#dadada";

document.bgColor = arr[Math.floor(7*Math.random())];
}
</script>
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 06-24-2009, 10:41 AM Re: change of color every time a page is reloaded
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You do realize you just replied to a 4 year old thread?
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-30-2009, 05:25 AM Re: change of color every time a page is reloaded
Average Talker

Posts: 18
Name: Roshan Dark
Trades: 0
hahhahhahahaahahah :-) , four year old thread , and public still putting replies..... :-)
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
roshandark is offline
Reply With Quote
View Public Profile Visit roshandark's homepage!
 
Reply     « Reply to change of color every time a page is reloaded
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35900 seconds with 12 queries