加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

LigerUi中,使用LG.ajax返回JSON提示信息的Asp.Net拼法(示例,

发布时间:2020-12-15 20:58:00 所属栏目:百科 来源:网络整理
导读:LG.ajax({ url: "../See/Pasdit.ashx",loading: '正在保存中...',data: { pass: password,U_Id: "1",pord2: Neword1,ajaxaction: "Padit" },success: function (result) { alert(JSON2.stringify(result));//【弹出后台返回的信息】 if (result.result == "o
                LG.ajax({
                    url: "../See/Pasdit.ashx",loading: '正在保存中...',data: { pass: password,U_Id: "1",pord2: Neword1,ajaxaction: "Padit" },success: function (result) {

                        alert(JSON2.stringify(result));//【弹出后台返回的信息】 

                        if (result.result == "ok") {
                            LG.showSuccess('保存成功!');
                        } else {
                            LG.showError(result.result);
                            $("#txtPassword").val("");
                            $("#txtPassword").focus();
                            return;
                        }
                    },error: function (message) {

                        $("#txtPassword").val("");
                        $("#txtPassword").focus();

                        LG.showError(message);
                    }
                });

注意:上面是前台,重点是 //【弹出后台返回的信息】
下面是后台,不要运行实例,而是要看重点语句用法

            loginSuccess = "{"result":"原密码输入错误"}";  // 主要看这个返回格式,其实字符串中的【双引号】的表示就是【"】
            this.context.Response.Write(loginSuccess);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读