
已解决问题
谷歌G2c用户在2013.09.03提交了关于“源代码php 用jquery ajax 请求,接收不到返回json的array”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-12-25T20:00:01。//判断是否有ajax请求$act=!empty($_GET['cate'])?$_GET['cate']:'';
if($act=='cate')
{
$html=$GLOBALS["**arty"]->fetch('library/dia_goods_list.lbi');
$result=array("html"=>$html);
echo$result;
}
$.ajax({
type:"Get",
url:"diamond.php",
data:"name=John&location=Boston&cate=cate",
dataType:"json",
success:function(msg){
alert(msg);
show(msg);
}希望大家能够帮助她。
详细问题描述及疑问://判断是否有ajax请求
$act=!empty($_GET['cate'])?$_GET['cate']:'';
if($act=='cate')
{
$html=$GLOBALS["**arty"]->fetch('library/dia_goods_list.lbi');
$result=array("html"=>$html);
echo$result;
}
$.ajax({
type:"Get",
url:"diamond.php",
data:"name=John&location=Boston&cate=cate",
dataType:"json",
success:function(msg){
alert(msg);
show(msg);
}期待您的答案,你是我的宝贝,你是我的花,谢谢你对我的帮助!