public function login(){
$shuju ;
if(IS_AJAX){
$shuju = $this -> check_register();
if($shuju == 1){
}else{
$this -> ajaxReturn($shuju,'eval');
}
}
$this -> display();
}
web中js代码:
function register_account(){
$.ajax({
type:"post",
url:"http://web.flowermall.com/index.php/Home/User/login",
async:true,
// dataType:'json',
success:function(msg){
alert(msg);
}
});
}
alert出来 非法数据对象 如果是alert(msg.user_name)username是我验证中的一个字段 显示出来的就是undefined
最佳答案