Disable submit button dengan checkbox

<script type="text/javascript">
function disab(cb, val){
 if(cb.checked == 1){
 document.getElementById('submit').disabled = false;
 } else {
 document.getElementById('submit').disabled = true;

<input type='checkbox' name='term' onClick="Javascript:disab(this, 1);"/>Term gw neh<br />
<input type='submit' id='submit' value='kirim' disabled="disabled" />


Published by


just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s