input获得焦点但是写入不了内容:        多个input时只能最后一个获得焦点,不论点击哪一个都是最后一个input获得焦点
例子: zjl/zjl0/wx_s/login/login.wxml      
解决办法:       ① wxml:   input 添加            id ,                                                   为后面获取这个值做准备            focus="{{name_focus}}" ,              true: 获得焦点            bindchange="bindChange",      change事件,获得input value值      bindtap="listenerPhoneInput"  绑定操作事件        js :      data 参数内设置 name_focus        小程序    
listenerPhoneInput: function(e){ // 用户名input 获得焦点。 可填写内容
    this.setData({
        name_focus: true,
        user_name: e.detail.value
    });}},
bindChange: function(e){   // 存入input用户名,密码
    inputContent[e.currentTarget.id] = e.detail.value
},










TAG标签: 微信小程序小程序input

http://www.xiaochengxub.com/read-107431.html