Getting value of selected checkboxlist items.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 314
<script type = "text/javascript">
function Get_CheckBoxList_Values(chk)
{
var chkBox = document.getElementById('<%= chk_project.ClientID %>');
var options = chkBox.getElementsByTagName('input');
var listOfSpans = chkBox.getElementsByTagName('span');

for (var i = 0; i<= options.length-1; i++)
{
if(options[i].checked)
{
alert(listOfSpans[i].attributes["JSvalue"].value);
}
}
}
</script>

Comments or Responses

Login to post response