Friday, February 10, 2012

how to know checkbox is checked in jquery

how to know checkbox is checked in javascript, Here we are provide a example similar to that 

Select Check box

code for this example :

<script src=""></script>

function selectcheckbox(x){
var cls = $(x).attr('class');

alert('chek box is checked');
else { alert('check box is unchecked');}

<form action="" method="">
<input type="checkbox"  name="checkboxname" value="checkboxvalue" class="checkboxcls"  onclick="selectcheckbox(this)"/> Select Check box

No comments:

Post a Comment

If you Satisfied , Please Leave a comment