Ahora he tenido un poco de tiempo y he tecleado algunas líneas de código:
Código PHP:
<html>
<head>
<script type="text/javascript">
var activo = null;
function marcar(obj) {
obj.style.background = 'green';
if (activo) activo.style.background = 'red';
activo = obj;
}
</script>
</head>
<body>
<input type="button" style="background:red" onclick="marcar(this)" />
<input type="button" style="background:red" onclick="marcar(this)" />
<input type="button" style="background:red" onclick="marcar(this)" />
</body>
</html>
Saludos,