<form name=form1>
<input type=checkbox onclick="this.form.txt.disabled=!this.checked">
<input name=txt disabled></form>