What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » changing backgrounds in html?

changing backgrounds in html?
Author: Message:
marissa
Veteran Member
*****

Avatar
ahaha

Posts: 1191
Reputation: 66
35 / Female / –
Joined: Mar 2004
O.P. changing backgrounds in html?
is there a code or something that'll change your background on something in HTML nothing else, but i was just wondering. Probably not, since html is just basic stuff...but you never know. i just want to know so i can have an alternating background on my myspace (NOT msn's my spaces >.<)

This post was edited on 08-03-2005 at 03:26 AM by marissa.
08-03-2005 03:25 AM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: changing backgrounds in html?
two ways, im sure both don't work in your case.

<style>body{background:url("http://new/background.png");}</style>

orrrrrr

<script>document.body[0].background = "http://new/background.png"</script>
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
08-03-2005 03:28 AM
Profile PM Web Find Quote Report
marissa
Veteran Member
*****

Avatar
ahaha

Posts: 1191
Reputation: 66
35 / Female / –
Joined: Mar 2004
O.P. RE: changing backgrounds in html?
oh crap, maybe i worded that wrong..
like i want...say, a blue background *the person refreshes* a red background *refresh* a green background...etc. or would those codes still work? i dont know.
08-03-2005 03:42 AM
Profile PM Find Quote Report
YottabyteWizard
Senior Member
****

Avatar

Posts: 709
Reputation: 23
37 / Male / Flag
Joined: Mar 2005
RE: changing backgrounds in html?
Dont know the code but im pretty sure javascript does the trick....
08-03-2005 03:50 AM
Profile E-Mail PM Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
RE: changing backgrounds in html?
You need a javascript code that would randomly pick the background color on page load.
[Image: top.gif]
08-03-2005 03:59 AM
Profile PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: changing backgrounds in html?
* ShawnZ claps for the people that told her what to do but not how to do it
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
08-03-2005 04:00 AM
Profile PM Web Find Quote Report
marissa
Veteran Member
*****

Avatar
ahaha

Posts: 1191
Reputation: 66
35 / Female / –
Joined: Mar 2004
O.P. RE: changing backgrounds in html?
haha yeah, but atleast they didnt waste their time :p. MySpace doesnt support java code...losers :rolleyes:
08-03-2005 04:06 AM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: changing backgrounds in html?
code:
<!-- TWO STEPS TO INSTALL RANDOM COLORS:

   1. Paste the first code into the HEAD of your HTML document
   2. Put the last coding into the BODY of your HTML document  -->
       
<!-- STEP ONE: Paste this code into the HEAD of your document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function rnd(scale) {
var dd=new Date();     
return((Math.round(Math.abs(Math.sin(dd.getTime()))*1000000000)%scale));
}
function show() {       
document.blah.bg.value=document.bgColor;       
document.blah.fg.value=document.fgColor;
}
document.fgColor=256*rnd(255)+16*rnd(255)+rnd(255);
document.bgColor=256*rnd(255)+16*rnd(255)+rnd(255);
// End -->
</SCRIPT>

<!-- STEP TWO: Paste this coding into the BODY of your HTML document  -->

<BODY>

<CENTER>
<a href="javascript:history.go(0)">Click here to get new colors</a>
</center>
<FORM name=blah>
<table border=0 width=100%><tr><td align=left>Foreground color</td>
<TD align=right>Background color</TD>
</TR>
<TR>
<TD align=left>
<input type=text name=fg>
</TD>
<TD align=right>
<input type=text name=bg>
</TD>
</TR>
</TABLE>
</FORM>
</CENTER>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  1.28 KB  -->
08-03-2005 04:10 AM
Profile E-Mail PM Find Quote Report
surfichris
Former Admin
*****

Avatar

Posts: 2365
Reputation: 81
Joined: Mar 2002
RE: changing backgrounds in html?
quote:
Originally posted by marissa cool
HTML nothing else
quote:
Originally posted by marissa cool
MySpace doesnt support java code.
I decided i'd leave off the losers part (A)

This post was edited on 08-03-2005 at 04:21 AM by surfichris.
08-03-2005 04:12 AM
Profile PM Find Quote Report
marissa
Veteran Member
*****

Avatar
ahaha

Posts: 1191
Reputation: 66
35 / Female / –
Joined: Mar 2004
O.P. RE: changing backgrounds in html?
oh, i wasnt calling them losers :) I was calling myspace losers for not being able to use java, but i guess that's good in a way. it would muck peoples pages up to the point of...no return! dun dun dun
08-03-2005 04:14 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On