<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script src="jquery-1.7.min.js"></script>
<script type="text/javascript">
$(function(){ //下面参数位置可以交换
$.getJSON('http://ttzz.meibu.net:9090/b.phpcode=200&call=?',function(data){
alert(data.name);});
});
</script>
</head>
<body>
</body>
</html>
**********服务端b.php 代码清单:******************[php] *********************************/
<?php
header('Content-Type:text/html;Charset=utf-8');
$code = $_GET['code']; //传过来的数据
$call = $_GET['call']; //传过来的函数名,有可能是自定义,也有可能是jQery系统定义的。
$json_data='{"name":"li"}';
$text='abc';
$res=$call. "(".$json_data.")";
echo $res;
?>