public function Billing()
{
//后台ajax验证
$result = array();
$cate['S_Customer'] =$_POST['S_Customer'];
$result = M('Customer')->where( $cate)->field('phone,c_name')->select();
$this->ajaxReturn($result,"json");
$this->display();
}
为什么显示的只是数组,而我原网页不显示了,,,难道我的输出有问题?
只出现[{"phone":"13802149988","c_name":"\u5f20\u4e09"},{"phone":"13802144455","c_name":"\u674e\u56db"}],F12检查,发现页面上也就只有这数组,,其他东西都没有。。
怎么样才能实现二级联动呢。。
求大神出答案!!。。
$this->ajaxReturn 里面有个exit
$this->ajaxReturn 里面有个exit
thinkphp 的 ajax 响应默认是返回 json 的
再说你也通知 $.ajax 返回的是 json 替我解码(dataType:'json',)
但是你的返回结果中并没有 success 和 msg 项
而 $('#phone').html(data.msg) 中,data.msg 的内容应该是 html 代码
不要随意的去抄人家的代码,要理解为什么要那么写
thinkphp 的 ajax 响应默认是返回 json 的
再说你也通知 $.ajax 返回的是 json 替我解码(dataType:'json',)
但是你的返回结果中并没有 success 和 msg 项
而 $('#phone').html(data.msg) 中,data.msg 的内容应该是 html 代码
不要随意的去抄人家的代码,要理解为什么要那么写
已抢23164个
抢已抢117569个
抢已抢139135个
抢已抢6188个
抢已抢35196个
抢已抢7826个
抢