I have checkboxes inside a dropdown menu. I've to get the checkboxes which are selected (checked)
Code:
<ul role="menu" class="dropdown-menu" id="comp">
<li><a href="#">
<input type="checkbox">
<span class="lbl"> Monday</span>
</a>
</li>
<li><a href="#">
<input type="checkbox">
<span class="lbl"> Tuesday</span>
</a>
</li>
<li><a href="#">
<input type="checkbox">
<span class="lbl"> Wednesday</span>
</a>
</li>
<li><a href="#">
<input type="checkbox">
<span class="lbl"> Thursday</span>
</a>
</li>
<li><a href="#">
<input type="checkbox">
<span class="lbl"> Friday</span>
</a>
</li>
</ul>
<input type="submit" class="btn btn-info" onclick="myFunction()" value="Submit">
<script type="text/javascript">
function myFunction()
{
/* Get selected check boxes here */
}
</script>