使用一下代码进行请求
$.ajax({
url: "userAdd",
dataType: "json",
type: "POST",
cache: false,
async:true,
success: function(data){
alert(456);
}
});Controller代码是 public function userAdd(){
$ret['status'] = '1';
$ret['content'] = 'content';
$this->ajaxReturn($ret,'json');
}为什么就是请求不成功 最佳答案