Php için JS dizi gönder

0 Cevap php

I'm trying to do something similar to this question. I want to send to the server the id's of the selected checkboxes. I'm using jquery only because the example. my ajax code is pure JS.

Bu benim kodudur:

js:

function DeleteTest(ind)
 {
   if (confirm('Are you sure you want to delete this test?'))
      {
    ​   $(function() {
       var testdel = $('input[name=deletetest]').serialize();
       alert(testdel);
       window.open('test.php' + "?"+testdel,'_self');
           }   ​);
        return true;}
         else { return false;}
 }
  oCell.innerHTML = "<input type='checkbox' name='deletetest' value='"+ ind +   "')';>"; // create checkbox for each row in ajax

html:

<form id="checkboxform" action="test.php" method="post">
<tbody id="auditTblBody">
</tbody>
</table>
<input type="button" value="Submit AJAX Request" onclick="DeleteTest()" />
</form>

Bu kod ile ben GET ile yalnızca bir değer olsun. testdel iyi. (Yani deletetest=477&deletetest=476) benim sorunum bu bilgileri göndermek için nasıl.

teşekkür ederim!

0 Cevap