话不多说
js部分
class = “position” id = “usergroupname” >
< script >
$ . ajax ({
type: ‘POST’ ,
url: ‘/api/usergroup?id=11’ ,
data: {
},
success : function ( data ) {
document . getElementById ( ‘usergroupname’ ). innerHTML = data . data . toString ();
}
});
php部分
public function usergroup (){
$id = $this -> request -> param ( ‘id’ ); $res = Db :: table ( ‘fa_user_group’ )-> where ( ‘id’ , $id )-> value ( ‘name’ ); $this -> success ( ‘ok’ , $res ); }
海报
0 条评论
110
相关文章
本站已关闭游客评论,请登录或者注册后再评论吧~