Your Ad Here

Posted By

sekihin on 04/10/09


Tagged

javascript aspnet


Versions (?)

Get CheckBoxList Value


 / Published in: JavaScript
 

  1. function getCheckBoxList( ) {
  2. var cboxObj = document.getElementById ( "<%=CheckBoxList1.ClientID %>" );
  3. var cboxList = cboxObj.getElementsByTagName ( 'input' );
  4. var lbList = cboxObj.getElementsByTagName ( 'label' );
  5. for ( var i = 0; i < cboxList.length; i++)
  6. {
  7. if (cboxList[i].checked )
  8. {
  9. alert (lbList[i].innerText );
  10. }
  11. }
  12. }

Report this snippet  

You need to login to post a comment.