Det lød som en 'sjov'...ja ja I know :)...opgave og jeg endte med dette :
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN' '
http://www.w3.org/TR/REC-html40/strict.dtd'><html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<title>Test</title>
<script type='text/javascript'>
var oRows = new Array('a','b','c','d');
var oCol = 4;
function change(oObject)
{
for(i=0; i<oRows.length; i++) {
if(oObject.id.substr(0,1)!=oRows[i])
document.getElementById(oRows[i]+oObject.id.substr(1)).disabled=true;
else {
for(a=0; a<oCol; a++) {
if(oObject.id!=oRows[i]+"_"+a && document.getElementById(oRows[i]+"_"+a).disabled===false) {
for(e=0; e<oRows.length; e++) {
document.getElementById(oRows[e]+"_"+a).disabled=false; } } } } }
}
function oReset()
{
for(i=0; i<oRows.length; i++) {
for(a=0; a<oCol; a++) {
document.getElementById(oRows[i]+"_"+a).disabled=false;
document.getElementById(oRows[i]+"_"+a).checked=false; } }
}
</script>
</head>
<body style='background-color: gray;'>
<form id='oForm' method='post' action='oLink.php' onsubmit="return false;">
<table><tr>
<td><input type='radio' id='a_0' name='a' value='0' onclick='change(this);'>A0</td>
<td><input type='radio' id='a_1' name='a' value='0' onclick='change(this);'>A1</td>
<td><input type='radio' id='a_2' name='a' value='0' onclick='change(this);'>A2</td>
<td><input type='radio' id='a_3' name='a' value='0' onclick='change(this);'>A3</td>
</tr><tr>
<td><input type='radio' id='b_0' name='b' value='0' onclick='change(this);'>B0</td>
<td><input type='radio' id='b_1' name='b' value='0' onclick='change(this);'>B1</td>
<td><input type='radio' id='b_2' name='b' value='0' onclick='change(this);'>B2</td>
<td><input type='radio' id='b_3' name='b' value='0' onclick='change(this);'>B3</td>
</tr><tr>
<td><input type='radio' id='c_0' name='c' value='0' onclick='change(this);'>C0</td>
<td><input type='radio' id='c_1' name='c' value='0' onclick='change(this);'>C1</td>
<td><input type='radio' id='c_2' name='c' value='0' onclick='change(this);'>C2</td>
<td><input type='radio' id='c_3' name='c' value='0' onclick='change(this);'>C3</td>
</tr><tr>
<td><input type='radio' id='d_0' name='d' value='0' onclick='change(this);'>D0</td>
<td><input type='radio' id='d_1' name='d' value='0' onclick='change(this);'>D1</td>
<td><input type='radio' id='d_2' name='d' value='0' onclick='change(this);'>D2</td>
<td><input type='radio' id='d_3' name='d' value='0' onclick='change(this);'>D3</td>
</tr><tr>
<td colspan='4' style='text-align: center; cursor: pointer;' onclick='oReset();'>Reset !</td>
</tr></table>
</form>
</body>
</html>
Lad mig høre hvad du syntes.
Mvh. Johan