简体   繁体   English

如何使用外部文本输入源(例如扫描程序)输入数据而不使用HTML输入字段?

[英]How can i use an outer source of text input( ex. Scanner) to input data without having an HTML input field?

I have attached my usb scanner to the pc. 我已将usb扫描仪连接到电脑上。 it works well with a normal input field. 它适用于普通输入字段。 But i dont want to show the field box. 但我不想显示字段框。 I only want to read the Data through scanning. 我只想通过扫描读取数据。

I tried hidding the input field by using input type="hidden" . 我尝试使用input type =“hidden”隐藏输入字段。 that hides the field but data doesnt pass. 隐藏了该领域,但数据没有通过。 I tried display:none; 我试过display:none; same as before. 和之前一样。 And Finally i tried vanishing the field's border/outline But it was useless. 最后我尝试消除了该领域的边界/轮廓但它没用。

Just Figured out that setting the z-index: -1 does the trick. 刚想出设置z-index:-1就可以了。 If there's a better option let me know 如果有更好的选择让我知道

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

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