Foxtable(狐表)用户栏目专家坐堂 → [求助]Ajax传递的数组使用问题


  共有2929人关注过本帖平板打印复制链接

主题:[求助]Ajax传递的数组使用问题

帅哥哟,离线,有人找我吗?
fczhaobo
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:395 积分:4070 威望:0 精华:0 注册:2017/3/24 15:10:00
[求助]Ajax传递的数组使用问题  发帖心情 Post By:2021/5/14 11:24:00 [只看该作者]

将B网页传递过来的数组:[ "yfsh0229", "654321" ]  ,供A网页使用,不成功,请帮忙看一下,谢谢!
B网页代码:    
    Dim ja As New Jarray '定义数组
    ja.Add(zhanghao)
    ja.Add(mima)    
    e.WriteString(ja.ToString)

传递的例子是:"[ "yfsh0229", "654321" ] "

js代码:
function getUserxx() {
var mycars = new Array()
    mycars = sendAjaxText("","logon_wx.htm","",false);      // [ "yfsh0229", "654321" ]
//alert(mycars)
    document.getElementById("userzhanghao").valueL=mycars[0];
    document.getElementById("password").value=mycars[1];
}



A网页代码:

Dim e As RequestEventArgs = args(0)
Dim wb As new weui
wb.AppendHTML("<style>#btn2:before {position: relative;right: 5px; top: 5px;content: url(./images/weixin24.png);}</style>",True)
wb.AppendHTML("<style>#btn1:before {position: relative;right: 5px; top: 5px;content: url(./images/mima24.png);}</style>",True)
wb.InsertHTML("<div style='width:100%;text-align:center;'><img style='width:35%;height:auto;' src='.\logo.png'></div>")
wb.AddPageTitle("","pageheader","逸飞书画云ERP管理系统","")
If e.PostValues.ContainsKey("Userzhanghao") AndAlso e.PostValues.ContainsKey("password")   Then '判断是否是验证失败后的重新登录  'Or e.GetValues.ContainsKey("openid")
    wb.AddTopTips("","toptip1","用户名或密码错误!").msec = 2000 '如果用户通过登录按钮访问,则给用户一个2秒的提示.
End If
wb.AddForm("","form1","logon.htm")
With wb.AddInputGroup("form1","ipg1")
    With .AddInput("userzhanghao","ERP账号","text")
        .PlaceHolder= "请输入ERP账号"
        '.Readonly = False '输入框是否只读
        .Value = e.Cookies("userzhanghao")
    End With
    
    With .AddInputCell("ic2")
        .AddLabel("lyz","密    码",0)
        .AddInput("password","password",1).PlaceHolder= "ERP密码"
        .AddVcodeButton("vyz","忘记密码",2).Attribute=""
    End With
End With

With wb.AddButtonGroup("form1","btg1",False)
    .Add("btn1", "密码登录", "submit").Kind = 1
   With  .add("btn2","微信一键登陆","")
        .Kind = 1
        .Attribute=""  
    End With
End With
wb.AppendHTML("<script src='./lib/table.js'></script>") '引入脚本文件
wb.AppendHTML("<script>" & vars("js-logon-wx") & "</script>") '引入脚本文件
e.WriteString(wb.Build) '生成网页
[此贴子已经被作者于2021/5/14 11:26:40编辑过]

 回到顶部