<html>
  <head>
    <base href="http://localhost:8080/zdystudy/">
    
    <title>My JSP 'ocxtest.jsp' starting page</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script Language="JavaScript">

function PrinterEnd(){
alert("Printed SN : ");
var obj=document.getElementById("vj69");
obj.OpenPort();

}
</script>  </head>
  
  <body>    This is my JSP page. <br>
    
    <form name='printTest' id='printTest' align="center">
<table id='table1' align="center">

<tr>
<td align="center" colSpan="3">
<OBJECT ALIGN=CENTER codeBase="C:\WINDOWS\system32\VJ6900.ocx"  CLASSID="clsid:3423AEE9-CB9D-4A3E-9ABC-72E7234CAB78"
WIDTH=200 HEIGHT=200 BORDER=1 HSPACE=5
id="vj69">
<PARAM NAME="DataLen" VALUE="29">
</OBJECT>
<input type='button' name='b2' id='b2' onclick='PrinterEnd();' value='Submit Printed SN'>
</td>
</tr>
</table>
</form>
  </body>
</html>当我调用ocx里写的方法时出现错误提示说对象不支持此属性或方法