例1

XML/HTML code

    <script type="text/javascript">
    $.post("server.php",{name:[[1,2],[3,4]]})
      .done(function(data){
        alert(data[0][1]); // 输出2
      });
    </script>

server.php

header('content-type:application:json;charset=utf8');
echo json_encode($_POST['name']);

例2



本文转载:CSDN博客