Foxtable(狐表)用户栏目专家坐堂 → js 怎么监控键盘是否弹出


  共有1928人关注过本帖树形打印复制链接

主题:js 怎么监控键盘是否弹出

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/12 19:34:00 [显示全部帖子]

参考代码,自己写成js函数调用

 

Select Case e.Path
    Case "test.htm",""
        Dim wb As New weui
        wb.AddForm("","form1","test.htm")
        With wb.AddInputGroup("form1","ipg1","基本资料")
            .AddInput("xm","姓名","text")
            .AddInput("nl","年龄","number")
            .AddInput("rq","日期","date")
            .AddSwitch("vip","VIP客户")
        End With
        With wb.AddInputGroup("form1","ipg2","备注")
            .AddTextArea("bz",5).Placeholder = "请输入200字以内的备注"
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "确定", "button").Attribute = ""
        End With
        wb.AppendHTML("<script>var height = document.body.clientHeight;window.addEventListener('resize', function () {var cheight = document.body.clientHeight; if(height == cheight) {bz.value='键盘收起了'}else{bz.value='键盘弹起了'};});</script>")
        e.WriteString(wb.Build) '生成网页
End Select


 回到顶部