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);" /> |
Monday, January 25, 2010
Get CheckBox Text and Checked property using Javascript
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment