三级联动 php: where('ParentId=1')-select(); $this-assign('area',$area); $this-display(); } public function getCity(){ $ParentId=I('post.ParentId'); $current_city=M('citys')-where('ParentId='.$ParentId)-select(); $data['data']=$current_c
php:
where('ParentId=1')->select();
$this->assign('area',$area);
$this->display();
}
public function getCity(){
$ParentId=I('post.ParentId');
$current_city=M('citys')->where('ParentId='.$ParentId)->select();
$data['data']=$current_city;
$this->ajaxReturn($data);
}
public function getCounty(){
$ParentId=I('post.ParentId');
$current_county=M('citys')->where('ParentId='.$ParentId)->select();
$data['data']=$current_county;
$this->ajaxReturn($data);
}
}
html:
三级联动
三级联动
