0

脚本。PHPページにデータを送信したい:

<script type="text/javascript">
  $(document).ready(function() {
      $('#example').dataTable({
        "bProcessing": true,
        "type": "POST",
        "sAjaxSource": "abcd.php",
        "data": [
              { game:"Football" },
              { game:"Baseball" }
              ],
        "aoColumns": [
              { mData: 'name' } ,
              { mData: 'count' }
            ]
      });  
  });
</script>

abcd.php (データが php ページに来ない):

<?php
   $game=$_POST['game'];
  ?>
4

1 に答える 1