Return to tutorial on
Period Disable
JavaScript
<script language="JavaScript">
<!--
function enable_radio(status)
{
status=!status;
document.getElementById("r1").disabled=status;
document.getElementById("r2").disabled=status;
}
//-->
</script>
HTML
<form name=f1 method=post action=period-disable-demock.php>
<input type="checkbox" name=others onclick="enable_radio(this.checked)" value='yes'>Others<br><br>
<input type=radio name=gender value=male id='r1'>Male
<input type=radio name=gender value=female id='r2'>FeMale <br>
<input type=submit value=Submit>
</form>