<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all {
IE\:clientCaps {behavior:url(#default#clientcaps)}
}
</STYLE>
</HEAD>
<BODY>
<IE:clientCaps ID="oClientCaps" />
<SCRIPT>
bMSvmAvailable = oClientCaps.isComponentInstalled("{D27CDB6E-AE6D-11CF-96B8-444553540000}","ComponentID");
alert("是否安装了FLASH?---"+bMSvmAvailable);
</SCRIPT>
:
</BODY>

解决方案 »

  1.   

    try {
         obj= new ActiveXObject("ActiveXName");
        }
      catch (ex){
         obj = null ;
     }if (obj==null)
    {
      window.open("http://xxxx/xx.htm");
    }
    else
    {}
      

  2.   

    淘宝旺旺不是一个ocx控件,而是一个exe可执行文件
    我怎么知道应用程序的isComponentInstalled
      

  3.   

    isComponentInstalled是在注册表中查找CLASSID是否存在,如果你的程序包含ACTIVEX(ACTIVEX可以存在于.ocx文件,也可以是.dll和.exe文件)则注册OCX,DLL,EXE文件时自动会在注册表中加CLASSID.
    如果没有ACTIVEX,也可人为地在安装时在注册表中加CLASSID.
      

  4.   

    谢谢,我打个比方吧
    我可不可以用javascript检查本机是否
    装了QQ?如果安装了调用什么方法打开QQ聊天
    窗口?
      

  5.   

    看来淘宝网站上的一段代码?但不懂window.location="wangwang:SendIM?" + id;是什么意思?-----------------------------------------------------------------    function click(args){
          var id = args;
          if (wangwangInstalled){
              window.location="wangwang:SendIM?" + id;
          }else if (document.all){
              window.target="_blank";
              //window.open("http://taobaoafp.allyes.com/main/adfclick?db=taobaoafp&bid=121,771,773&cid=0,0,0&sid=888&show=ignore&url=http://www.taobao.com/help/wangwang/tip.php", "", "width=422,height=210");
              window.open("http://www.taobao.com/help/wangwang/wangwang.php", "", "");
          }
        }
      

  6.   

    window.location="wangwang:SendIM?" + id是向他们自己的程序发送一个指定,就像超星图书阅读器那样..
      

  7.   

    <a href="tencent://message/?uin=8888888">QQ</a>这样就可以打开QQ发信窗口。
    检查QQ是否安装用http://im.qq.com/js/checkqqclient.js
    或用我提供的方法查clsid:ED4CA2E5-0EEA-44C1-AD7E-74A07A7507A4"tencent" 是QQ的URL Protocol,我们熟知的URL Protocol有http,ftp,mailto 
    URL Protocol可以自定义的,就是写注册表啦。参见注表:HKEY_CLASSES_ROOT\HTTP 或HKEY_CLASSES_ROOT\TENCENT
      

  8.   

    楼主的厉害,终极高手了,帮我在root下建一个和tencent差不多结构的注册表好不好,比如说在IE的地址栏里打"notenote"后他就调用notepad.exe(记事本)程序:)
      

  9.   

    把如下存为xx.reg文件,双击运行REGEDIT4
    [HKEY_CLASSES_ROOT\notenote]
    "URL Protocol"="notepad.exe"
    [HKEY_CLASSES_ROOT\notenote\DefaultIcon]
    @="notepad.exe,1"
    [HKEY_CLASSES_ROOT\notenote\shell\open\command]
    @="notepad.exe"这样在IE地址栏中输入“notenote:”就会运行记事本程序
      

  10.   

    那怎么给 notenote: 传参数那?
      

  11.   

    那怎么给 notenote: 传参数那?
    -----不行的,notepad.exe不是为URL Protocol而设计。
    因为IE地址为notenote:c:\xx.txt时,notepad.exe得到的参数是“notenote:c:\xx.txt”而不是“c:\xx.txt”notepad.exe中没有去掉"notenote:"的处理过程。