In general, when we do the page activity may encounter click a button to send some relevant information through QQ to your friends, this information pushes the function of how to implement it! Let me show you how to use it!
The code is as follows:
<!DOCTYPE HTML><HTMLLang= "en -us"><Head> <MetaCharSet= "UTF-8"/> <title>Xxx</title></Head><Body> <ahref= "javascript:;"class= "QQ">Send a message to a friend</a></Body></HTML><Scripttype= "Text/javascript"src= "Js/jquery.min.js"></Script><Script>functionQqshare () {varP={URL:'http://wwww.baidu.com', /*get URL, can add from share to QQ logo, convenient statistics*/desc:'send a message to a friend', Title:'send a message to a friend', /*share title (optional)*/Summary:"', /*share Summary (optional)*/Pics:"', /*share pictures (optional)*/Flash:"', /*video address (optional)*/site:'http://wwww.baidu.com', /*share sources (optional) such as: QQ sharing*/Style:'203', Width: -, Height: - }; vars= []; for(varIinchp) {S.push (i+ '=' +encodeuricomponent (P[i]||"')); } varQhref= "http://connect.qq.com/widget/shareqq/index.html?"+S.join ('&'); $(". QQ"). attr ({href:qhref,target:"_blank"});}; $(". QQ"). Click (function() {Qqshare ();})</Script>
Through the above code can be implemented via JS to send information to friends!
How to send messages to QQ friends via JS