Code:
<html>
<head>
<title>ElZetto</title>
<script type='text/javascript'>
function check()
{
var chBox1 = document.getElementById('chBox1');
var chBox2 = document.getElementById('chBox2');
var chBox3 = document.getElementById('chBox3');
var button = document.getElementById('button');
if( chBox3.checked == true
&& chBox2.checked == true
&& chBox1.checked == true )
{
button.disabled = false;
}
else
{
button.disabled = 'disabled';
}
}
</script>
</head>
<body>
<input type='checkbox' id='chBox1' onclick='check();' /> Elzet<br />
<input type='checkbox' id='chBox2' onclick='check();' /> LZ<br />
<input type='checkbox' id='chBox3' onclick='check();' /> PQ<br />
<input type='button' id='button' disabled='disabled' value='Oh noez!' onclick='window.location.href="http://www.google.com"' />
</body>
</html>

edith:
und das ganze mit vordefinierter reihenfolge:
Code:
<html>
<head>
<title>ElZetto</title>
<script type='text/javascript'>
var order = { box1: 0, box2: 0, box3: 0 };
var def = { box1: 3, box2: 1, box3: 2 };
function check( identifier )
{
var chBox1 = document.getElementById('chBox1');
var chBox2 = document.getElementById('chBox2');
var chBox3 = document.getElementById('chBox3');
var button = document.getElementById('button');
switch( identifier )
{
case "box2":
if( chBox2.checked == true )
{
p = 1;
if( order.box1 != 0 || order.box3 != 0 )
{
p = 2;
}
if( order.box3 != 0 && order.box1 != 0 )
{
p = 3;
}
}
else
{
p = 0;
}
order.box2 = p;
break;
case "box3":
if( chBox3.checked == true )
{
p = 1;
if( order.box1 != 0 || order.box2 != 0 )
{
p = 2;
}
if( order.box2 != 0 && order.box1 != 0 )
{
p = 3;
}
}
else
{
p = 0;
}
order.box3 = p;
break;
case "box1":
default:
if( chBox1.checked == true )
{
p = 1;
if( order.box2 != 0 || order.box3 != 0 )
{
p = 2;
}
if( order.box3 != 0 && order.box2 != 0 )
{
p = 3;
}
}
else
{
p = 0;
}
order.box1 = p;
break;
}
if( chBox3.checked == true && order.box3 == def.box3
&& chBox2.checked == true && order.box2 == def.box2
&& chBox1.checked == true && order.box1 == def.box1 )
{
button.disabled = false;
}
else
{
button.disabled = 'disabled';
}
}
</script>
</head>
<body>
<input type='checkbox' id='chBox1' onclick='check( "box1" );' /> Elzet<br />
<input type='checkbox' id='chBox2' onclick='check( "box2" );' /> LZ<br />
<input type='checkbox' id='chBox3' onclick='check( "box3" );' /> PQ<br />
<input type='button' id='button' disabled='disabled' value='Oh noez!' onclick='window.location.href="http://www.google.com"' />
</body>
</html>
(ändere die werte bei "var def = { ... };" um die reihenfolge zu ändern)