您当前的位置: 首页 >  ajax

苗先生的PHP记录

暂无认证

  • 1浏览

    0关注

    190博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

.ajax .post .get

苗先生的PHP记录 发布时间:2020-04-19 11:55:16 ,浏览量:1

在这里插入图片描述 $.post 参数一:请求发送的url, 参数二:规定请求发送的数据, 参数三(可选):请求成功时运行的方法

demo:aqy

$.post('{:url("admin/change")}',{'id':id,'status':status},function (res) {
                if(res.code>0){
                    layer.alert(mess+res.msg,{icon:2});
                }
                else{
                    layer.msg(mess+res.msg, {icon: 1});
                    setTimeout(function (){window.location.reload();},1000);
                }
            },'json');

在这里插入图片描述

在这里插入代码片

$.get函数 第一参数为url地址,第二参数为url后面附带的东西,以对象的方式 demo:{id:ids}就是url后面有一个id=ids

关注
打赏
1665468453
查看更多评论
立即登录/注册

微信扫码登录

0.0355s