第一种需要添加好友的一个方式
<a href="tencent://message/?uin=123456789&Site=&Menu=yes">点这个链接会打开一个和QQ是123456789的用户聊天的窗口</a>
第二种不需要添加好友但是需要开通qq客服服务
<link href="css/kefu.css-v=1.css" rel="stylesheet" type="text/css" /> <div id="kefu1"> <div class="cs_close"> <a href="javascript:;" onClick="kefu1.style.display = 'none'"> <span>关闭</span> </a> </div> <div class="cs_tel"></div> <div class="cs_tel_ct"> <span class="cs_tel_num">4007889299</span> 工作日:上午8:30-12:00<br /> 工作日:下午13:30-17:30<br /> </div> <div class="cs_spr"></div> <div class="cs_online"></div> <div class="cs_online_ct"> <div class="cs_online_qq"> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1648104226&site=qq&menu=yes"> <img border="0" src="http://wpa.qq.com/pa?p=2:1648104226:41" alt="QQ客服1" title="QQ客服1"> </a> </div> <div class="cs_online_qq"> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=727091913&site=qq&menu=yes"> <img border="0" src="http://wpa.qq.com/pa?p=2:727091913:41" alt="QQ客服2" title="QQ客服2"> </a> </div> <div class="cs_online_qq"> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=29633131&site=qq&menu=yes"> <img border="0" src="http://wpa.qq.com/pa?p=2:29633131:41" alt="QQ客服3" title="QQ客服3"> </a> </div> </div> <div class="cs_qcode"> <a href="javascript:void(0)" target="_blank"> <img src="images/code.jpg" width="120" height="120" title="用手机微信扫一扫" /> </a> </div> <span class="cs_tel_ct"> 扫描二维码访问手机端</span> </div>
QQ客服服务开通网址:http://shang.qq.com/v3/index.html.(具体请百度,具体不赘述)
参考自:https://blog.csdn.net/jdfkldjlkjdl/article/details/41480679