可能这可以帮助你(文件名:getdata.php):
<?
if($_GET['ajax']==1){
$page = array(
array("element1","element2","element3","element4"),
array("element1","element2","element3","element4"),
array("element1","element2","element3","element4"),
);
echo json_encode($page);
}else{
?>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<button class="getdata" >Get Data</button><div class="jsdata"></div>
</body>
<script>
$('.getdata').click(function(){
$.ajax({
type:"POST",
url:"getdata.php?ajax=1",
success:function(data){
var res = eval("("+data+")");
$('.jsdata').html("$page[1][3],$page[2][3],$page[3][3] respectively:"+res[0][3]+","+res[1][3]+","+res[2][3]);
}
})
});
</script>
</html>
<? } ?>