I want to check a checkbox is checked or not using jquery. When click on the check box, check the checkbox is checked or not using jquery. My code is given below.
<script>
function check(id)
{
if($("#id:checked").length == 1)
{
alert("cheked");
}
}
</script>
Html
$i=1;
<input name="" type="checkbox" value=""
id="one<?php echo $i; ?>" onclick="check(one<?php echo $i; ?>)"/>
Aucun commentaire:
Enregistrer un commentaire