Jquery条码扫描器集成 [英] Jquery Barcode Scanner Integration

查看:171
本文介绍了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条码扫描器集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆