梦想的起点

my shop:http://fashion-for-you.taobao.com/

导航

判断客户端是否装有QQ-来自清凉小屋

判断客户端是否装有QQ

function IsInstallQQ(){
                
    try{//支持
        var xmlhttp=new ActiveXObject("TimwpDll.TimwpCheck");        
        return true;                        
    }
    catch(e){//不支持
        location.href='http://is.qq.com/webpresence/up_alarm.shtml';
       //window.open('http://is.qq.com/webpresence/up_alarm.htm','','toolbar=no,location=no,directories=no,status=no,menubar=no, scrollbars=yes,resizable=no,copyhistory=no,width=410, height=410,top=0,left=0')
       return false;
    }
    return false;
}

function IsInstallSupMiniQQ() {
                
     try{//支持                        
         var xmlhttp=new ActiveXObject("TimwpDll.TimwpCheck");
         var  n = xmlhttp.GetVersion();        
         if (n < 2.1) {
             location.href='http://is.qq.com/up_alarm.shtml';                        
             return false;
         }
         return true;                        
    }
    catch(e){//不支持
        location.href='http://is.qq.com/up_alarm.shtml';                        
        return false;
    }
    return false;
}


<script language="javascript">
    var boolFals=IsInstallQQ();
     if(boolFals==true) {
         location.href='Tencent://Message/?Menu=yes&Uin=41411118&websiteName=www.xmlhome.net';setTimeout('window.close()', 1 )
     };
</script>

posted on 2010-06-02 17:41  梦想的起点  阅读(453)  评论(0编辑  收藏  举报