0

My project i'm doing now is getting the weigh from the scale that use RS-232 port and post it into the website then press submit and the data will be saved into the server. I also study how to get the value from these port using the java API called javax.comm. However, I think it just work on the server, and could be work for one computer. that's the problem. therefore, I want to make a website that the client computer can access to the website and weigh the scale then save it into the server. So, how can we do it? Does javascript work on it?

thanks :)

4

1 回答 1

0

当然,您可以使用浏览器插件来执行此操作,但这将使应用程序浏览器特定。相反,您可以创建一个简单的桌面代理(Windows 服务、任务栏应用程序),该代理将安装在客户端计算机本身上。

现在,此代理应该响应来自您网页的指向 http://[localhost]:[port] 的 HTTP 请求。这可能需要在代理中嵌入一个简单的 HTTP 服务器。您必须处理的另一个复杂性是跨域请求。您可以使用 JSONp 或 CORS 来处理它。

于 2012-10-10T03:59:36.693 回答