function checkboxClick(obj)
{
var lbl = obj.nextSibling;
while(lbl.nodeName.toLowerCase()!='label')
lbl=lbl.nextSibling;
alert(lbl.innerHTML);
if (obj.checked)
alert('checked');
else
alert('not checked');
}
<asp:CheckBox ID="chk" runat="server" Text="Check"
onclick="checkboxClick(this);" />
0 comments:
Post a Comment