<script language="javascript" type="text/javascript">
function changebg(num)
{
var k1obj = document.getElementById("k1");
var k2obj = document.getElementById("k2");
var image=document.getElementById("image");
switch(num)
{
case "1":
k1obj.style.background = "url(/images/righthead3.jpg)";
k2obj.style.background = "url(/images/righthead2.jpg)";
k1obj.style.cursor ="hand" ;
image.src = "http://www. ";
k1obj.style.size="14px"
break;
case "2":
k2obj.style.background = "url(/images/righthead3.jpg)";
k1obj.style.background = "url(/images/righthead2.jpg)";
k2obj.style.cursor ="hand" ;
image.src= "http://www.";
break;
}
}
</script>
改变颜色
--<script language="javascript" type="text/javascript">
function changebg(num)
{
var k1obj = document.getElementById("k1");
var k2obj = document.getElementById("k2");
var tr1=document.getElementById("tr1");
var tr2=document.getElementById("tr2");
var image=document.getElementById("image");
switch(num)
{
case "1":
k1obj.style.backgroundColor="#B02F10";
k2obj.style.backgroundColor="#F6F6F6";
k1obj.style.color="#ffffff";
k2obj.style.color="#B02F10";
tr1.style.display="block";
tr2.style.display="none";
break;
case "2":
k1obj.style.backgroundColor="#F6F6F6";
k2obj.style.backgroundColor="#B02F10";
k1obj.style.color="#B02F10";
k2obj.style.color="#ffffff";
tr1.style.display="none";
tr2.style.display="block";
break;
}
}
</script>