Search results for 'bgColor'. 2 post(s) found.

  1. 2007/09/03 Color Table
  2. 2007/09/03 Cursor Changer
2007/09/03 13:10

Color Table


Here,JavaScript helps you manipulate the background of the document. Either choose the color you want by its name,or create a unique color by using the " " and "-" with the Red-Green-Blue buttons. A really neat effect.

<!-- TWO STEPS TO INSTALL COLOR TABLE:

   1.  Paste the designated script into the HEAD of your HTML document
   2.  Add the code into the BODY of your HTML document  -->
         
<!-- STEP ONE:  Paste this script into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

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

<!-- Begin
function changeBackground(hexNumber) {
document.bgColor=hexNumber
}
prefix="#"
rnum1=0
bnum1=0
gnum1=0
rnum2=0
bnum2=0
gnum2=0
hexNumber2="#000000";
rcount=0;
bcount=0;
gcount=0;
function num2hex(num) {
if (num==15) return "f";
else if (num==14) return "e";
else if (num==13) return "d";
else if (num==12) return "c";
else if (num==11) return "b";
else if (num==10) return "a";
else if (num==9) return "9";
else if (num==8) return "8";
else if (num==7) return "7";
else if (num==6) return "6";
else if (num==5) return "5";
else if (num==4) return "4";
else if (num==3) return "3";
else if (num==2) return "2";
else if (num==1) return "1";
else return "0";
}
function changeBackground2(number) {
if(number == 1) {
rnum1=rcount%16;
if (rcount <15) {
rcount=rcount 1;
  }
}
if(number == 2) {
gnum1=gcount%16;
if (gcount <15) {
gcount=gcount 1;
  }
}
if(number == 3) {
bnum1=bcount%16;
if (bcount <15) {
bcount=bcount 1;
  }
}
if(number == 4) {
rnum1=rcount%16;
if (rcount > 0) {
rcount=rcount-1;
  }
}
if(number == 5) {
gnum1=gcount%16;
if (gcount > 0) {
gcount=gcount-1;
  }
}
if(number == 6) {
bnum1=bcount%16;
if (bcount > 0) {
bcount=bcount-1;
  }
 }
hexNumber2 = prefix num2hex(rnum1) num2hex(rnum2) num2hex(gnum1) num2hex(gnum2) num2hex(bnum1) num2hex(bnum2);
  document.bgColor=hexNumber2
}
// End -->
</SCRIPT>

<!-- STEP TWO:  Add this code to the BODY of your HTML document  -->

<BODY>

<CENTER>
<FORM METHOD="POST" NAME="background">
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR>
<TD Align=center><INPUT TYPE="button" VALUE="Red" ONCLICK="changeBackground('#FF0000')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Green" ONCLICK="changeBackground('#00FF00')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Blue" ONCLICK="changeBackground('#0000FF')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="White" ONCLICK="changeBackground('#FFFFFF')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Black" ONCLICK="changeBackground('#000000')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Grey" ONCLICK="changeBackground('#C0C0C0')"></TD>
</TR>
</TABLE>
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR><TD><center>Variable Background Color Changer</center></TD>
</TR>
</TABLE>
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR>
<TD Align=center><INPUT TYPE="button" VALUE="  Red" ONCLICK="changeBackground2(1)"><P>
<INPUT TYPE="button" VALUE="- Red" ONCLICK="changeBackground2(4)"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="  Green" ONCLICK="changeBackground2(2)"><P>
<INPUT TYPE="button" VALUE="- Green" ONCLICK="changeBackground2(5)"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="  Blue" ONCLICK="changeBackground2(3)"><P>
<INPUT TYPE="button" VALUE="- Blue" ONCLICK="changeBackground2(6)"></TD>
</TR>
</TABLE>
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR>
<TD><center>Keep pressing buttons to change color<BR>
(The color will start as black)</center></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:  3.44 KB  -->

Another posts included in "HTML, Javascript"

New Window (0)2007/09/04
How to display message on browser status bar ? (0)2007/09/04
Pop Up Window On Top (0)2007/09/04
Cursor Changer (0)2007/09/03
Dual Scroller (0)2007/09/03
Enlarge Image (0)2007/09/03
Confirm The Link Clicked (0)2007/09/03
Select And Deselect All Checkboxes By Javascript (0)2007/08/31
Trackback 5 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject Problem compulsive amp responsible gambling links.

    Tracked from Compulsive gambling problem. 2009/02/19 11:03 delete

    Problem compulsive amp responsible gambling links.

  2. Subject Online gambling slots machines.

    Tracked from Gambling machines. 2009/02/20 09:27 delete

    Video gambling machines. Gambling systems slot machines.

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 05:50 delete

    moneyideas

  4. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 14:14 delete

    moneyideas

  5. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:37 delete

    moneyideas

2007/09/03 13:07

Cursor Changer


Another background changer that uses the onmouseover command. Try it out. Just put your mouse on the colors

<!-- ONE STEP TO INSTALL CURSOR CHANGER:

   1.  Put the specified code into the BODY of your HTML document  -->

<!-- STEP ONE: Copy this code into the BODY of your HTML document  -->
         
<BODY>

<CENTER>

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

[<a href="/"
onmouseover="document.bgColor='green'">Green</a>]
[<a href="/"
onmouseover="document.bgColor='greem'">Bright Green</a>]
[<a href="/"
onmouseover="document.bgColor='seagreen'">Sea Green</a>]
[<a href="/"
onmouseover="document.bgColor='red'">Red</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='magenta'">Magenta</a>]
[<a href="/"
onmouseover="document.bgColor='fusia'">Fusia</a>]
[<a href="/"
onmouseover="document.bgColor='pink'">Pink</a>]
[<a href="/"
onmouseover="document.bgColor='purple'">Purple</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='navy'">Navy</a>]
[<a href="/"
onmouseover="document.bgColor='blue'">Blue</a>]
[<a href="/"
onmouseover="document.bgColor='royalblue'">Royal Blue</a>]
[<a href="/"
onmouseover="document.bgColor='Skyblue'">Sky Blue</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='yellow'">Yellow</a>]
[<a href="/"
onmouseover="document.bgColor='brown'">Brown</a>]
[<a href="/"
onmouseover="document.bgColor='almond'">Almond</a>]
[<a href="/"
onmouseover="document.bgColor='white'">White</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='black'">Black</a>]
[<a href="/"
onmouseover="document.bgColor='coral'">Coral</a>]
[<a href="/"
onmouseover="document.bgColor='olivedrab'">Olive Drab</a>]
[<a href="/"
onmouseover="document.bgColor='orange'">Orange</a>]
</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.71 KB  -->

Another posts included in "HTML, Javascript"

Color Table (0)2007/09/03
New Window (0)2007/09/04
How to display message on browser status bar ? (0)2007/09/04
Dual Scroller (0)2007/09/03
Enlarge Image (0)2007/09/03
Confirm The Link Clicked (0)2007/09/03
Select And Deselect All Checkboxes By Javascript (0)2007/08/31
Javascript Mouse Event Handler Example (0)2007/08/31
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 00:04 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 08:38 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:45 delete

    moneyideas