The HTML code is as follows:
<a href= "javascript:;" onclick= "Chatqq ()" >QQ Consulting </a>
The JS code is as follows:
<script> function chatqq () { // 1234567 refers to the QQ number Window.location.href= "Mqqwpa://im/chat?chat_type=wpa&uin=1234567&version=1&src_type=web&web_ Src=oicqzone.com "; } </script>
Attention:
1. Mobile Phone call QQ, will not stay in when the Web page, but directly call the mobile phone QQ app, stay in the app;
2. PC-side call QQ.exe application, in the desktop window will pop up the Browser dialog box , usually browser-side first intercept the request, and then let the user choose whether to start the QQ application; Refer to table 1 below.
3. Depending on the device, sometimes the protocols used are not the same, refer to table 2 below.
Tab 1-Browser default blocking
PC-side: Browser type |
whether to intercept the prompt |
interception rate |
Ie |
Whether |
So so |
Firefox |
Is |
High |
360 |
|
|
Google |
Is |
High |
Table 2-Device side and protocol type
Device Type |
Protocol Mode |
PC-Side |
tencent:// |
Mobile side |
mqqwpa:// |
In addition, how does PC end invoke QQ application?
Please see "how does PC-side page call QQ for online chat?" ".
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. 73303061
Mobile Phone Web page call QQ to realize the effect of online chatting