Jquery条码扫描器集成

编程入门 行业动态 更新时间:2024-10-24 17:25:58
本文介绍了Jquery条码扫描器集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

使用USB条形码扫描器扫描条形码后,如何模仿键盘按键?我对此没有任何想法,我只想获得一些关于如何做到这一点的建议/指示。如果我有这种形式,条形码号码将如何在该文本框中输入?谢谢!

How can I emulate keyboard press once I scanned a barcode using a usb barcode scanner? I don't have any idea about this and I just want to get some suggestions/instructions on how can I do it. If I have this form, how will the barcode number be inputted in that textbox? thanks!

<form method="post" action=""> <input type="text" id="barcode-input" name="barcode-input" value=""/> </form>

推荐答案

我见过的条码扫描器我不得不承认)就像一个键盘一样。旧的甚至有一个PS / 2端口。但即使是USB的人也喜欢将自己标识为键盘。当你扫描一个代码时,扫描仪的行为就好像你实际上已经按下了键盘上的数字键,可能以一个返回键结束。

The barcode scanners that I have seen (not that many I have to admit) act like a keyboard. Old ones even have a PS/2 port. But even the USB ones like to just identify themselves as a keyboard. When you scan a code, the scanner behaves as if you would have actually pressed number keys on your keyboard, probably ending with a return key.

所以你要做的是把重点放在你的文本框中,扫描你的代码并完成。

So what you do is put a focus in your textbox, and scan your code and be done.

更多推荐

Jquery条码扫描器集成

本文发布于:2023-08-07 06:51:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1317591.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条码扫描器   Jquery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!