Alter IE Colors

[Total: 0    Average: 0/5]

This will change the color and background color of an object.

Body Code:

<table width="55" height="55" id="test"> 
<tr> 
<td><div id="change">some text</div></td> 
</tr> 
</table> 
<a href="javascript:doIt(0)">x</a>
|
<a href="javascript:doIt(1)">y</a>
<script>
var values=new Array(true,true);
function doIt(a)
{
values[a]=!values[a];
if(a)document.all.change.style.color=values[a]?"#FF00FF":"#00FF00";
else document.all.test.bgColor=values[a]?"#00FFFF":"#FF0000";
}
</script>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *