Hola
Prueba con este
Código Javascript
:
Ver original<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function valores(f) {
cual1 = 'c[]';
cual2 = 'c2[]';
todos = new Array();
for (var i = 0, total = f[cual1].length; i < total; i++) {
if (f[cual1][i].checked) todos[todos.length] = f[cual1][i].value;
}
for (var i = 0, total = f[cual2].length; i < total; i++) {
if (f[cual2][i].checked) todos[todos.length] = f[cual2][i].value;
}
document.getElementById('sel').value = todos.join(', ');
}
</script>
</head>
<body>
<form>
<div id="m_c1">
<input name="c[]" type="checkbox" value="0" />
<input name="c[]" type="checkbox" value="1" />
<input name="c[]" type="checkbox" value="2" />
<input name="c[]" type="checkbox" value="3" />
<input name="c[]" type="checkbox" value="4" />
<input name="c[]" type="checkbox" value="5" />
</div>
<div id="m_c2">
<input name="c2[]" type="checkbox" value="6" />
<input name="c2[]" type="checkbox" value="7" />
<input name="c2[]" type="checkbox" value="8" />
<input name="c2[]" type="checkbox" value="9" />
<input name="c2[]" type="checkbox" value="10" />
<input name="c2[]" type="checkbox" value="11" />
</div>
<input type="button" onclick="valores(this.form);" value="mostrar" />
<input type="text" id="sel" value="" />
</form>
</body>
</html>
Suerte