MSN Chat small function _javascript tips in JavaScript discuz code

Source: Internet
Author: User
Add the following 2 functions to JavaScript

function msnoperate (action, MSN) {
var actionarray = new Array ();
Actionarray = {
' Add ': ' http://go.discuz.com/?app=msn&linkid=5&msn= ' + MSN,
' Chat ': ' http://go.discuz.com/?app=msn&linkid=6&msn= ' + MSN
}

if (messengerinstalled ()) {
window.open (Actionarray[action]);
} else {
window.open (' http://go.discuz.com/msn/msn.html ', ' _blank ', ' width=571, height=498 ');
}
}

function messengerinstalled () {
try {
New ActiveXObject ("Msnmessenger.p4quicklaunch");
return true;
}
catch (e) {
return false;
}
}
Add the following in the HTML code:
———————————–
Click on the icon to chat with me! <a href= "#" onclick= "msnoperate (' Add ', ' xxx@hotmail.com ')" ></a>

<a href= "#" onclick= "msnoperate (' chat ', ' xxx@hotmail.com ')" ></a>

<a href= "Http://wpa.qq.com/msgrd?V=1&Uin=123456789&Site= Green teahouse son ~| WWW.GETO.CN&Menu=yes "target=" _blank "> </a>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.