DEMO : Enable disable Checkbox by using buttons

PHP


Tutorial on Checkbox disable
  • Checkbox validation in form & disabled property


JavaScript

<SCRIPT LANGUAGE="JavaScript">
<!-- 	
function chk_control(str) {
if(str=='dsb'){document.getElementById('ck1').disabled=true;}
else {document.getElementById('ck1').disabled=false;}
}
//  End -->
</script>

HTML

<form name=form1 method=post action=check.php>
<table width=200  >

<tr  ><td ><input type=checkbox name=ckb id=ck1 value=1></td><td >PHP</td></tr>
<tr  ><td ><br><br><input type=button value='Disable' onClick="chk_control('dsb')";></td>
<td ><br><br><input type=button value='Enable' onClick="chk_control('enb')";></td></tr>
</table></form>

JavaScript Checkbox Reference

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    More on CheckBox & PHP

    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer