简体   繁体   English

HTML文本输入 - 防止Windows 8触摸键盘?

[英]HTML text input - Prevent Windows 8 touch keyboard?

Is there a way to prevent the on-screen keyboard from popping up by default when a HTML text input field gets focus on a windows 8 touch screen pc? 当HTML文本输入字段聚焦在Windows 8触摸屏电脑上时,有没有办法防止屏幕键盘默认弹出?

The application in question is a barcode/rfid scanning web application. 有问题的应用程序是条形码/ rfid扫描Web应用程序。

It would be preferable if the user could also still pop up the on-screen keyboard manually if they need it. 如果用户还需要手动弹出屏幕键盘,那将是更好的选择。

Preferably a solution which avoids changing the global settings of the machine. 优选地,避免改变机器的全局设置的解决方案。

More Info: The text input field needs to be able to receive focus and accept keyboard input from the bar-code and rfid scanners attached to the terminal. 更多信息:文本输入字段需要能够接收焦点并接受来自连接到终端的条形码和rfid扫描仪的键盘输入。

Try 尝试

$("#textbox1").attr("readonly", "readonly");
                or
$("#state").attr("readonly", true);

Thanks AB 谢谢AB

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM