以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 无法通过submitAjaxFileds传递逻辑开关的值 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=104436) |
-- 作者:liufucan -- 发布时间:2017/7/29 9:28:00 -- 无法通过submitAjaxFileds传递逻辑开关的值 此问题只存在于QQ浏览器,用手机自带浏览器则不会,何解? |
-- 作者:有点蓝 -- 发布时间:2017/7/29 10:07:00 -- 不同浏览器对网页的解析都有一定的差异的。 msgbox(e.postvalues("逻辑开关名称")),看看返回的是什么值
|
-- 作者:liufucan -- 发布时间:2017/7/29 10:23:00 -- 试过了,逻辑开关不管开不开都返回空值 |
-- 作者:liufucan -- 发布时间:2017/7/29 10:24:00 -- safari浏览器可正常返回值,代码如下: Dim e As RequestEventArgs = args(0) \'验证页面(登录页面) Dim wb As New weui Dim username As String = e.PostValues("username") \'验证手机是否空值 Dim password As String = e.PostValues("password") \'验证密码是否空值 Dim cookie_yzm As String = e.Cookies("yanzhengma") \'从cookie中获取验证码 Dim yzm As String = e.PostValues("yzm") \'验证_验证码 Dim jizhumima As String = e.PostValues("jizhumima") \'验证_记住密码 \' MessageBox.Show(yanzm) \'MessageBox.Show(jizhumima) msgbox(e.postvalues("jizhumima")) If username = "" Then e.WriteString("账户不能为空!") Return "" ElseIf password = "" Then e.WriteString("密码不能为空!") Return "" ElseIf yzm = "" Then e.WriteString("验证码不能为空!") Return "" ElseIf yzm <> cookie_yzm Then e.WriteString("请输入正确的验证码!") Return "" ElseIf jizhumima <> "是" Then e.WriteString("未确认服务协议!") Return "" End If Dim dr2 As DataRow = DataTables("网页用户").SQLFind("xm= \'"& username &"\'") If dr2 Is Nothing Then e.WriteString("用户不存在!") Return "" Else If password <> dr2("mm") Then e.WriteString("密码错误!") Return "" End If End If e.WriteString("OK") [此贴子已经被作者于2017/7/29 10:44:51编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/7/29 10:38:00 -- 定义逻辑开关的代码发上来 |
-- 作者:liufucan -- 发布时间:2017/7/29 10:43:00 -- Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AddPageTitle("","pageheader","东盛华庭","移动售楼系统") wb.InsertHTML("<h3 align=\'center\' style=\'margin-top:5px\'>用户登录</h3>") wb.AddTopTips("","toptip1","") \'用于显示动态错误提示 If e.PostValues.Count = 0 Then wb.AddForm("","form1","logon.htm").Attribute= "" \'调用函数 With wb.AddInputGroup("form1","ipg1","登录") \'wb.AddForm("","form1","logon.htm").Attribute = "" \'调用函数 \'With wb.AddInputGroup("form1","ipg1") .AddSelect("username","账户",DataTables("网页用户").GetComboListString("xm")) \'.AddInput("username","账户","text") .AddInput("password","密码","password") With .AddInputCell("ic5") \'通过InputCell增加输入框 .AddLabel("lyzm","验证码",0) \'增加标签,0显示在左边 .AddInput("yzm","text",1) \'增加输入框,1表示显示在中间 .AddImage("pim","/getvimg.htm",2).Attribute=""" \'增加一个图片,2比表示显示在右边 End With .AddSwitch("jizhumima","同意服务协议",True).Value = "是" With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "登录","submit") End With With wb.AddButtonGroup("form1","btg2", False) .Add("btn2", "免费注册","","/register.htm").Kind = 1 .Add("btn3", "忘记密码","","/getback.htm").Kind = 1 End With End With wb.AppendHTML("<script src=\'./lib/valid.js\'></script>") \'引入脚本文件 With wb.AddPageFooter("","pf1","第五代房地产管理信息系统(designed by fucan)") .AddLink("厦门365房地产MIS V1.0","http://xm365.top") End With End If e.WriteString(wb.Build) \'生成网页 js代码如下: function valid(){ var result=submitAjaxFileds("valid_login.htm","","username","password","yzm","jizhumima",false); if(result=="OK"){ return true; } else{ showTopTips("toptip1",result,2000); return false; } } |
-- 作者:liufucan -- 发布时间:2017/7/29 10:46:00 -- 刚发现把逻辑开关注释掉后验证码又不能传递了,同样只存在于QQ浏览器 |
-- 作者:有点蓝 -- 发布时间:2017/7/29 11:11:00 -- 我在安卓qq浏览器测试没有问题。 如果其它浏览器都没有问题,就用其它的吧。
|