电脑和移动设备从网页唤醒QQ聊天

亲测没问题

function chatQQ(){ 
	if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
    //alert(navigator.userAgent);  
    window.location.href = "mqq://im/chat?chat_type=wpa&uin=QQ号码&version=1&src_type=web";
} else if (/(Android)/i.test(navigator.userAgent)) {
    //alert(navigator.userAgent); 
    window.location.href = "mqqwpa://im/chat?chat_type=wpa&uin=QQ号码&version=1&src_type=web";
} else {
    window.location.href = "tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin=QQ号码";
}
   
}  

你可能感兴趣的:(js,唤醒APP)