-2

When I'm getting E-mail message I can not identify which checkbox is checked.

My JS code looks like this:

$(document).ready(function(){

$('#submit').click(function(){
    $.post("submit.php", 
        {service1: $('#service1').val(), 
         service2: $('#service2').val(), 

        function(data){
            $('#response').html(data);
        }
    );

});

What should I add to my code to identify which is checked? Thanks

1 Answers1

0

$('#services1').prop('checked') should do the trick.

Sunny Pun
  • 726
  • 5
  • 14