$.ajax({ url: "server.php", type: "POST", data: {..........},
<!DOCTYPE HTML> <html> <head> <title>Untitled</title> <meta charset="utf-8"> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <form> <input name="a" type="checkbox" value="3"> <input name="b" type="checkbox" value="1" checked="checked"> <input name="c" type="checkbox" value="7" checked="checked"> </form> <script> var s = $('form input:checked').serialize(); alert(s); </script> </body> </html>
data: $('form input:checked').serialize(),
'id='+id+'&'+$('form input:checked').serialize()
<!DOCTYPE HTML> <html> <head> <title>Untitled</title> <meta charset="utf-8"> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <form> <input id="xb" name="test" value="12345" type="hidden"> <input name="a" type="checkbox" value="3"> <input name="b" type="checkbox" value="1" checked="checked"> <input name="c" type="checkbox" value="7" checked="checked"> </form> <script> var s = $('input:checked, #xb','form').serialize(); alert(s); </script> </body> </html>