由于项目需要,写了一个网页插件,主要功能是读取刷卡的卡号. 我在插件里面有写入事件,但在网页上不知如何用JS用此事件. 代码如下:<body>
   <form id="form1" runat="server">
   <object id="ActiveDemo" classid="clsid:{6d5f0ff5-9157-4d5c-9913-745ce1a77398}" 
       width="200"> </object> 
       <script language="javascript">     
    
     </script>
    </form>
</body>
以上代码, 我应该如何用ActiveDemo插件里的事件. 顶者也有分.

解决方案 »

  1.   

    <HEAD>
    <OBJECT id="iep" codeBase="xxx.cab" onerror=";"
    classid="clsid:DE964AE0-22B6-41FA-8C3D-9AFBC9DE022E">
    </OBJECT>
    <script language="javascript">
    function copy()
    {
    }

    function login()
    {
    window.navigate("index.aspx");
    }

    function start()
    {
    }

    function reconf()
    {
    } </script>
    <script for="iep" event="onexception(tip)">
    info.innerHTML  = "系统运行出错!";
    error.innerHTML = tip;
    </script>
    <script for="iep" event="oncancel">
    var v = "中止下载过程将导致系统不完整! 请点击这里";
    </script>
    <script for="iep" event="oncomplete">
    </script>
    </HEAD>以前项目中的一小段代码,不知道能不能帮你解决。
      

  2.   


    <html>
    <head>
    <title>测试扫描仪</title>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312"><script language="JavaScript">
    <!--
    function Scan()
    {
    document.getElementById("FileName").value = "";
    document.getElementById("Picture").src = "null.jpg";
    var Result = Scaner1.Scan("DEFAULT");
    if (Result != "S_UNKNOW")
    {
    document.getElementById("FileName").value = Result;
    document.getElementById("Picture").src = Result;
    }
    else
    {
    alert("Result is " + Result);
    }
    }
    //-->
    </script>
    </head>
    <body bgcolor="#FFDDFF" text="#000000">
    <h1>测试扫描仪<br></h1>
    <form name="form1" method="post" action="http://192.168.0.1:8080//zzzz.jsp" >
    <table>
    <tr>
    <td>
    路径<Input type="text" name="idFileName" id = "FileName">
    </td>
    <td><Input type="hidden" name="idPictureStr" id = "PictureStr">
    </td>
    <td valign="top">
    <img id="Picture" src="null.jpg" width="230" height="297" >
    </td>
    <tr>
    <td>
    <input type="button" name="btnreadcard" id="btnreadcard" value="扫描" onclick="Scan()">
    </td>
    <td></td>
    </tr></form>
    <OBJECT
      classid="clsid:3FC76868-23DD-43DC-BC58-9324F83E86C1" id="Scaner1" 
      codebase="http://127.0.0.1/GeneralScaner.inf"#version=1.0.0.0"  
      width=0
      height=0
      align=center
      hspace=10
      vspace=10
    />
    </body>
    </html>
      

  3.   

    如果你的控件需要显示的话, 
    width=0      height=0
    应该设置的大于0
      

  4.   

    这个问题正好是我最近冥思苦想的 想起来值得收藏哇 考察源代码基本上得不到具体的html code