You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.5 KiB

<html>
<body>
<OBJECT id="PSKPrn"classid="clsid:81C07687-3353-4ABA-B108-94BCE81E5CBA"codebase="/PSKPrn_94BCE81E5CBA.ocx#version=1,0,0,3"width="0"height="0">
</OBJECT>
<OBJECT id="test"classid="clsid:56CA65E0-2077-44F1-A022-FF23CC891B23"codebase="/scan_FF23CC891B23.ocx#version=1,0,0,7"width="0"height="0">
</OBJECT>
<SCRIPT LANGUAGE="Javascript" type = "text/javascript">
function CheckKey()
{
if(event.keyCode == 13){
var namevalue=document.getElementById("text").value;
<!--alert(namevalue);-->
alert(namevalue);
document.getElementById("text").value="";
}
}
function Print()
{
//这里可以调用控件的已知方法
PSKPrn.OpenPort("POSTEK C168 200s");
PSKPrn.PTKClearBuffer();
PSKPrn.PTKSetLabelHeight(240, 20);
PSKPrn.PTKSetLabelWidth(400);
PSKPrn.PTKSetDarkness(10);
PSKPrn.PTKSetPrintSpeed(4);
PSKPrn.PTKDrawBar2DPdf417(26,26,400,240,1,0,2,4,33,7,0,0, "用鼠标点击升级用鼠标点击升级用鼠标点击升用鼠标点标点标点标点标点击升级用鼠标点击升用鼠标点标点标点标点标点击升级用鼠标点击升用鼠标点标点标点标点标点击升级用鼠点标点标点升级用鼠点点用鼠点标点标点标点升级用鼠点击升级用鼠点击升级用鼠标点击升级用鼠标标点击升级用鼠标点击升狗日的腾讯哈");
PSKPrn.PTKPrintLabel(1, 2);
PSKPrn.ClosePort();
}
function GetVersion()
{
test.GetActiveXInfo();
}
</SCRIPT>
<input type="text" name="text" onkeydown="CheckKey()"/><br/>
<input type="button" name="button" value="打印" onClick="Print()"/><input type="button" name="button" value="ActvieX版本" onClick="GetVersion()"/>
</body>
</html>