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 
 
function selectcheckbox(x){var cls = $(x).attr(‘class’);if($(‘.’+cls).attr(‘checked’)){alert(‘chek box is checked’);}else { alert(‘check box is unchecked’);}}
Select Check box
code for this example :

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

if($(‘.’+cls).attr(‘checked’)){
alert(‘chek box is checked’);
}
else { alert(‘check box is unchecked’);}

}

Select Check box

Advertisements

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