SCADA DIAView 嵌入H5页面并生成条码和二维码
的有关信息介绍如下:
条码和二维码是生产过程中工艺流程的基本识别方式,如何通过工业组态软件结合Html5+Jquery 来生成对应的条码和二维码?
创建窗口“H5”
找到对应的H5处理页面(自己可以自行开发,或开发打印功能都可以的)
Html5页面对应的页面代码如下:
在窗体打开的时候,加载 Web浏览器 对应的 条码生成h5
VBS脚本如下:
Dim h5Path,codeValueh5Path="file:///"&Sys.ProjectDir &"\H5CreateCode\index.html"codeValue=文本框0.TextIf Len(codeValue)<=0 then Exit SubEnd Ifh5Path=h5Path&"?code="&codeValueWeb浏览器0.Url=h5PathWeb浏览器0.print()
生成按钮的事件代码如下:
Dim h5Path,codeValueh5Path="file:///"&Sys.ProjectDir &"\H5CreateCode\index.html"codeValue=文本框0.TextIf Len(codeValue)<=0 then MsgBox "请输入要生成的条码内容!" Exit SubEnd Ifh5Path=h5Path&"?code="&codeValueWeb浏览器0.Url=h5PathWeb浏览器0.print()



