Home >Web Front-end >JS Tutorial >msn chat function in javascript Discuz code_javascript skills

msn chat function in javascript Discuz code_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:04:131065browse

Add the following 2 functions in 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 content to the html code:
——————————————
Click the icon to chat with me! msn chat function in javascript Discuz code_javascript skills

msn chat function in javascript Discuz code_javascript skills

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn