JS
var q = '4';
function checkQ()
{
document.getElementById("sub").disabled = true;
if(document.getElementById("q1").value == q)
{
document.getElementById("sub").disabled = false;
document.getElementById("sub").style.border = '2px solid #00FF00';
}
}
И сам HTML
<table class=head cellSpacing=5 cellPadding=5 align=center order=0>
<tbody>
<tr class=rows>
<td>2 + 2 =</td>
<td><input id="q1" onkeyup="checkQ()"><td>
</tr>
</tbody>
</table>
<table class=head cellSpacing=5 cellPadding=5 align=center border=0>
<tbody>
<tr>
<td>
<form action="" method="" name="goNext">
<input name="next" type="submit" value="Next" id="sub" disabled="disabled">
</form>
</td>
</tr>
</tbody>
</table>