<script></script>
<style>
.td1{
BACKGROUND-COLOR: #FFB84D;
}
.td2{
BACKGROUND-COLOR: #cccccc;
}
</style>
<input type="button" name="b1" value="按钮A" class="td2" onclick="this.className='td1'">
<input type="button" name="b2" value="按钮B" class="td2" onclick="b1.className='td2'">
<style>
.td1{
BACKGROUND-COLOR: #FFB84D;
}
.td2{
BACKGROUND-COLOR: #cccccc;
}
</style>
<input type="button" name="b1" value="按钮A" class="td2" onclick="this.className='td1'">
<input type="button" name="b2" value="按钮B" class="td2" onclick="b1.className='td2'">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
.start {color:ff0000; background:c8ff4e} </style>
</head>
<body bgcolor="#83E09C">
<input type=button id=gua onclick="this.className='start'" value=button>
<input type=button name=guagua value="another button" onclick="gua.className=''">
</body>
</html>
function on_click(a)
{
for(i=1;i<3;i++)
{
eval("form01."+"b"+i+".className='td2'");
}
eval("form01."+"b"+a+".className='td1'");
}
</script>
<style>
.td1{
BACKGROUND-COLOR: #FFB84D;
}
.td2{
BACKGROUND-COLOR: #cccccc;
}
</style>
<form name=form01>
<input type="button" name="b1" value="按钮A" onclick="on_click(1)">
<input type="button" name="b2" value="按钮B" onclick="on_click(2)">
</form>
<body> <input id=a1 value=a1 type=button backupcolor="" onclick='this.backupcolor=this.style.backgroundColor; this.style.backgroundColor="#123456"'>
<input id=a2 value=a2 type=button onclick="a1.style.backgroundColor = a1.backupcolor;">
</body>
</html>