工作心得网

工作心得精彩分享
代码积累持续学习

ajax提交

 $.ajax
                ({ //请求登录处理页
                    url: "Login.aspx", //登录处理页
                    dataType: "html",
                    //传送请求数据
                    data: { txtName: strTxtName, txtPass: strTxtPass },
                    success: function (strValue) { //登录成功后返回的数据
                        //根据返回值进行状态显示
                        if (strValue == "True") {//注意是True,不是true
                            $(".clsShow").html("操作提示,登录成功!" + strValue);
                        }
                        else {
                            $("#divError").show().html("用户名或密码错误!" + strValue);
                        }
                    }
                })

我们的缺点麻烦您能提出,谢谢支持!

关于站长