jQuery: Array gönder

0 Cevap php

Nasıl jQuery PHP bir dizi gönderebilirim?

Ben birçok <input type = "text" id = "search_term" /> var. Nasıl jQuery için bu verileri gönderebilir?

<head>
  <script>
    $(document).ready(function(){
      $('#button1').click(function(){
        var search_val=$("#search_term").val(); 

        $.post("ajax.php",
          { search_term : search_val },
          function(data) {
            $("#search_results").html(data);
          }
        );
      });
    });
  </script>
</head>
<body>
  <input type = "text" id = "search_term" />
  <input type = "text" id = "search_term" />
  <input type = "text" id = "search_term" />
  ...
  <input type = "button" id = "button1" value = "test" />
</body>

0 Cevap