MSN在线咨询插件为什么不能用呢?IE不支持还是MSN的版本问题?
许多的MSN插件写的都大同小异,用到了InstantMessage,从代码分析应该是用来打开一个对话框进行实时聊天,但不知为什么总是出现错误。网上有解释说要两个人同时在线,但这样仍然不行。我想问一下究竟能不能实现象Q一样的在线聊天功能,网上的说法对吗?以下为相关代码:
<OBJECT id=MsgrObj height=0 codeType=application/x-oleobject width=0 classid=clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28></OBJECT> <A href="javascript:go()">添加xxxx@hotmail.com</A> <SCRIPT type=text/javascript> function close_win() { win=top; win.opener=top; //win.close(); } function send_im() { document.getElementById('MsgrObj').InstantMessage('xxxx@hotmail.com'); } function wrong_stuff() { alert("请登陆MSN."); close_win(); return true; } function go() { send_im(); close_win(); } //window.onerror=wrong_stuff; function getStatus(string,id) { var url = "getstatus.asp?" + string; var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); xmlhttp.Open("Get",url,false); xmlhttp.send(); var urlEnd = xmlhttp.responseText; if (urlEnd == "1") { document.all[id].innerHTML = "在线"; } else { document.all[id].innerHTML = "离线"; } } function show(){ //getStatus(8009809,'k1'); //getStatus(8009808,'k2'); } </SCRIPT>