在网页里用<object classid="clsid:00100000-B1BA-11CE-ABC6-F5B2E79D9E3F"> 这种方式将控件在网页里引用,然后再用JS调用这个控件的非个特殊的方法,能调用成功则表示客户端已经正确安装了该软件,否则即没有安装。

解决方案 »

  1.   

    谢谢meizz(梅花雪) ,我没学过JS,请问您能给出一个js判断是否安装的示例代码吗?若没安装时则让页面上一个超链接可用.
    下面是那个产品的一个示例,不过它只在客户端已安装了的情况下才能正确运行,这个产品是一个显示TIF图像的程序,美国leadtools公司产品。
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    <html><head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <title>&#21326;&#40718;&#21338;&#35270;&#26723;&#26696;&#26174;&#31034;&#31034;&#20363;</title>
    </head><body><script language="VBScript">
    <!--
    Sub window_onLoad()
       zoomfactor = 30.0
       ImgShow.PaintSizeMode = 3
       ImgShow.BitonalScaling=2
       ImgShow.UnlockSupport L_SUPPORT_EXPRESS, "sk39uTYp"   
       ImgShow.PaintEffect = 0
       ImgShow.BitmapDataPath ="http://localhost/test/1.tif"   'ok可显示出图像来
     
    end sub
    -->
        </script><script language="VBScript">
    <!--
    dim zoomfactor
    dim iPage
    -->
        </script>
     <script language="VBScript"><!--Sub cmdZoomOut_Click()  '缩小图像按钮
         dim iFactor
         ImgShow.UnlockSupport L_SUPPORT_EXPRESS, "sk39uTYp"   
         ImgShow.ShowPanWin true
         iFactor= ImgShow.PaintZoomFactor
         iFactor=iFactor-30
         if iFactor<=0 then
          iFactor=10
         end if
         ImgShow.PaintZoomFactor = iFactorend subSub cmdRotate_Click()  '旋转图像按钮
          ImgShow.UnlockSupport L_SUPPORT_EXPRESS, "sk39uTYp"   
          ImgShow.FastRotate 90
    end sub--></script><p>
    <P>   下面是这个控件
    <OBJECT id=ImgShow style="LEFT: 0px; WIDTH: 888px; TOP: 0px; HEIGHT: 584px" 
    codeBase=controls/ltocx10N.cab height=584 width=888 align=baseline border=0 
    classid=clsid:00100000-B1BA-11CE-ABC6-F5B2E79D9E3F name=ImgShow VIEWASTEXT>
      <param name="_Version" value="65536">
      <param name="_StockProps" value="229">
      ............省略许多行
       <param name="Appearance" value="1">
       <param name="WindowLevelBitmap" value="-1"></OBJECT>&nbsp;</P></body>
    </html>