input获取焦点,但不调起键盘

1
2
3
4
5
6
7
$('#floatLabel').on('focus', () => {
        isFocus = true
        $('#floatLabel').attr("readOnly", true) //设置readOnly属性
        setTimeOut(function(){
          $('#floatLabel').attr("readOnly")//延迟移除readonly属性
          }, 200)
      })

  #floatLabel是input元素

posted @   大厨的笔记  阅读(790)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示