<script src="../../js/jquery-1.3.2.js" type="text/javascript"></script> <script> function button(){ //alert($('#form input').attr('value')); if($('#c').is(':checked')){ alert($('#c').val()); $("#c").attr("checked",""); }else{ alert('Пожалуйста, выберите из списка для выключить'); } } </script> <input type="button" onclick="button();" value="Выключить"><br><br> <form method="post" id="form"> <input type="checkbox" checked name="" id="c" value="1"> <input type="checkbox" checked name="" id="c" value="2"> </form>
<form method="post"> <input type="checkbox" checked name="allbox[]" value="1"> <input type="checkbox" checked name="allbox[]" value="2"> <input type="submit" name="submit"> </form> <? if($_POST['submit']) { if(!$_POST['allbox']==""){ foreach($_POST['allbox'] as $key){ echo $key; } } } ?>