But how get array from html5 checkboxes via jQ

I want to pass array in jQ ajax but how get array from html5 checkboxes via jQ…? I got from php (no jQ ajax) but now wanted try ajax…
$(‘input[name=“feature”]:checked’).val() // this do Not work
$(‘input[name=“feature”]:checked’).val() // this do Not work

<form action="#" method="post" id="quoteForm">
  <input type="radio" name="site" value="basic" />
  Basic Site<br/>
  <h2>Select Site Features</h2>
  <input type="checkbox" name="feature[]" value="Maintenance" />
  Maintenance Contract<br/>
  <input type="checkbox" name="feature[]" value="Video" />
  Video<br/>
  <input type="checkbox" name="feature[]" value="Database" />

                $.ajax({
                    url: "Client.php",
                    type: 'POST',
                    data: {
                        'site': $('input[name="site"]:checked').val(),
                        'feature': $('input[name="feature[]"]:checked').val()   //  this do Not work
$.ajax({
    url: "Client.php",
    type: 'POST',
    data: $('#quoteForm').serialize()
// ...
1 Like

Ok I will try it soon

worked thks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.