简体   繁体   English

如何将条形码扫描器与Web应用程序连接?

[英]How-to interface a barcode scanner with a Web Application?

I have in hands the creation of a Warehouse management system. 我手头有一个仓库管理系统的创建。 It's going to be a web application, it's supposed to run on desktops and 10' tablets. 这将是一个Web应用程序,它应该在桌面和10'平板电脑上运行。

I have never worked with barcode scanners, so my question is how do I interface a barcode scanner with my application? 我从未使用条形码扫描仪,所以我的问题是如何将条形码扫描仪与我的应用程序连接?

It's going to be a Java EE 6 application, the web framework to use is still open. 它将成为Java EE 6应用程序,使用的Web框架仍然是开放的。

Any experience with similar setups would be greatly appreciated. 任何有类似设置的经验都将非常感激。

Like Alex K. says, most scanners act like keyboards. 像Alex K.所说,大多数扫描仪都像键盘一样。 So handling the input shouldn't be difficult. 所以处理输入应该不难。

I have seen this type of system implemented with an ActiveX control (Ewwww), but I'm assuming you would want this app to be cross-browser. 我已经看到这种类型的系统用ActiveX控件(Ewwww)实现,但我假设你希望这个应用程序是跨浏览器的。

Java in the browser is as good as dead now, so an applet would most likely be out of the question. 浏览器中的Java现在和死了一样好,所以applet很可能是不可能的。

If the scanner sends a key first you could easily bind an event listener using JavaScript to wait for that key and then take the input. 如果扫描程序首先发送密钥,您可以使用JavaScript轻松绑定事件监听器以等待该密钥,然后获取输入。

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

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