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

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

  #floatLabel是input元素

原文地址:https://www.cnblogs.com/chefweb/p/13199164.html