一个分享WordPress、Zblog、Emlog、Typecho等主流博客的教程网站!
当前位置:网站首页 > 其他相关教程 > 正文

小程序获取键盘高度wx.onKeyboardHeightChange

作者:xlnxin发布时间:2023-02-14分类:其他相关教程浏览:1819


导读:wx.onKeyboardHeightChange(res=>{ console.log(res.height)})wx.getSelectedTextRan...

wx.onKeyboardHeightChange(res => {

  console.log(res.height)

})

wx.getSelectedTextRange()  在 input,textarea 等 focus 之后,获取输入框的光标位置,注意:中有在focus的时候调用此接口才有效

标签:程序小程序