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