天天看點

js 判斷是否安裝qq msn等

http://lcx.cc/?i=3065

<html>

 <head>

  <title> New Document </title>

  <meta name="Generator" content="EditPlus">

  <meta name="Author" content="">

  <meta name="Keywords" content="">

  <meta name="Description" content="">

  <script type="text/javascript">

  <!--

   checkInstalled = function(m) {  

  switch(m){

  case 'msn':  

   try {  

    new ActiveXObject("MSNMessenger.P4QuickLaunch");  

    return true;  

   }  

   catch (e) {  

    return false;  

  case 'qq':  

    new ActiveXObject("TimwpDll.TimwpCheck");  

   }

  case 'skype':  

   try{  

    new ActiveXObject("Skype.Detection");  

   }catch(e){  

   } 

  }  

   } 

  //-->

  </script>

 </head>

 <body>

  <input type="button" value="檢測有沒有安裝MSN" onclick="alert(checkInstalled('msn'))" />

  <input type="button" value="檢測有沒有安裝QQ" onclick="alert(checkInstalled('qq'))" />

  <input type="button" value="檢測有沒有安裝SKYPE" onclick="alert(checkInstalled('skype'))" />  

 </body>

</html>

繼續閱讀