Is it cool to add a QQ message function to my website? It is much better than leaving an email or a QQ number.
Let's see the effect.
Click this icon to create a temporary session. You can directly talk to me (if I am online) or leave a message if I am not online.
Speak nonsense,CodeAs follows:
(1) create an image button. The Code is as follows:
<Asp: imagebutton id = "imagebutton1" runat = "servers" imageurl = "http://wpslogo.qq.com/13_online.gif"
Onclick = "imagebutton1_click"/>
There are many webserviceicons provided by QQ. The 13 icon in front of 13_online.gif can be changed to display different icons.
(2) The onclick = "imagebutton1_click" Event code is as follows:
Protected void imagebutton1_click (Object sender, imageclickeventargs E)
{
Response. Write ("<script language = 'javascript 'Type = 'text/JavaScript '> window. Open ('HTTP: // wpa.qq.com/msgrd? V = 1 & uin = your QQ number ', '','', false); </SCRIPT> ");
}
Of course, this execution is a script, so you can also put this line of code in the script. Changing to a static webpage is also very convenient.