HackerX
07-17-2003, 01:16 PM
I have a piece of Java Script that changes the background color but I want it to only change the table bg color. and I also want to change the links color so i doesnt turn purple after clicked on.
heres the <HEAD>
<SCRIPT LANGUAGE="JavaScript">
var backColor = new Array(); // don't change this
// Enter the colors you wish to use. Follow the
// pattern to use more colors. The number in the
// brackets [] is the number you will use in the
// function call to pick each color.
backColor[0] = 'BLUE';
// Do not edit below this line.
function changeBG(whichColor){
document.bgColor = backColor[whichColor];
}
// End -->
</script>
And here is the Table in the <BODY>
<table width="100%" border="1">
<tr>
<td bgcolor="black"><div align="center"><font color="silver">6/17/03</font></div></td>
</tr>
<tr>
<td bgcolor="black"><center><font color="silver">Adding Free JavaScript section, plus submitted sites to search engines after installing No IE6 Image Tool Bar and No Right Click Script with source encryption.</font></center></td>
</tr>
<tr>
<td bgcolor="silver"><div align="center"><font color="silver"><a href="#" onMouseOver="javascript:changeBG(0)" font color="silver">Change by placing mouse over link</a></font></div></td>
</tr>
<tr>
<td bgcolor="black"><div align="center"><font color="silver">6/16/03</font></div></td>
</tr>
<tr>
<td bgcolor="black"><center><font color="silver">Site Up</font></center></td>
</tr>
<tr>
<td bgcolor="silver"><div align="center"><font color="silver"><a href="#" onMouseOver="javascript:changeBG(0)" font color="silver">Change by placing mouse over link</a></font></div></td>
</tr>
</table>
heres the <HEAD>
<SCRIPT LANGUAGE="JavaScript">
var backColor = new Array(); // don't change this
// Enter the colors you wish to use. Follow the
// pattern to use more colors. The number in the
// brackets [] is the number you will use in the
// function call to pick each color.
backColor[0] = 'BLUE';
// Do not edit below this line.
function changeBG(whichColor){
document.bgColor = backColor[whichColor];
}
// End -->
</script>
And here is the Table in the <BODY>
<table width="100%" border="1">
<tr>
<td bgcolor="black"><div align="center"><font color="silver">6/17/03</font></div></td>
</tr>
<tr>
<td bgcolor="black"><center><font color="silver">Adding Free JavaScript section, plus submitted sites to search engines after installing No IE6 Image Tool Bar and No Right Click Script with source encryption.</font></center></td>
</tr>
<tr>
<td bgcolor="silver"><div align="center"><font color="silver"><a href="#" onMouseOver="javascript:changeBG(0)" font color="silver">Change by placing mouse over link</a></font></div></td>
</tr>
<tr>
<td bgcolor="black"><div align="center"><font color="silver">6/16/03</font></div></td>
</tr>
<tr>
<td bgcolor="black"><center><font color="silver">Site Up</font></center></td>
</tr>
<tr>
<td bgcolor="silver"><div align="center"><font color="silver"><a href="#" onMouseOver="javascript:changeBG(0)" font color="silver">Change by placing mouse over link</a></font></div></td>
</tr>
</table>