//html
<input type="password" v-model="scannerMessage"
ref="scanTextbox" @keyup.13="scannerByUsb" @focus="stopKeyborad">
//js
stopKeyborad () {
this.$refs.scanTextbox.setAttribute('readonly', 'readonly');
setTimeout(() => {
this.$refs.scanTextbox.removeAttribute('readonly');
}, 200);
}
jQuery获取和设置input元素的值(监听input元素的值变化)
上面是“移动端如何阻止input框获得焦点时手机键盘的弹出”的全面内容,想了解更多关于 js 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_12047.html
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

网站排名不佳的原因是什么?
帝国CMS网站换服务器需要注意哪些事项
LongCat-Video:美团开源136亿参数高效AI长视频生成模型 












