xataku_nakusute
07-28-2003, 12:20 AM
<html>
<body onload="dis()">
<script type="text/javascript">
function tos()
{
document.f1.i1.disabled=false;
}
</script>
<script type="text/javascript">
function dis()
{
document.f1.i1.disabled=true;
}
</script>
<form name="f1">
<input type="checkbox" name="en" onclick="tos()"> Agree to Terms of
Sevrice
<input type="button" name="i1" value="Submit">
</form>
</body>
</html>
how can i modify this so that when the checkbox is checked, the button is enabled and when unchecked, disabled?
<body onload="dis()">
<script type="text/javascript">
function tos()
{
document.f1.i1.disabled=false;
}
</script>
<script type="text/javascript">
function dis()
{
document.f1.i1.disabled=true;
}
</script>
<form name="f1">
<input type="checkbox" name="en" onclick="tos()"> Agree to Terms of
Sevrice
<input type="button" name="i1" value="Submit">
</form>
</body>
</html>
how can i modify this so that when the checkbox is checked, the button is enabled and when unchecked, disabled?